Betrayed by a bitfield
Posted Feb 4, 2012 22:37 UTC (Sat) by giraffedata
In reply to: Betrayed by a bitfield
Parent article: Betrayed by a bitfield
Right, it's a useful feature of de facto C, but maybe not of standard C. This is just an academic discussion about the standard, since it seems everyone agrees GCC needs to change regardless of whether it presently implements the standard.
As long as you know that storing to your memory mapped I/O regions is a no-op, you can use standard C with volatile to usefully fetch from them, but otherwise you need more than standard C. You need common sense C. It just seems strange to me because writable I/O regions did exist at the time this accomodation for reading them was added to the spec.
to post comments)