This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/50521] -fstrict-volatile-bitfields is not strict
- From: "henrik at henriknordstrom dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 28 Oct 2011 07:32:48 +0000
- Subject: [Bug c/50521] -fstrict-volatile-bitfields is not strict
- Auto-submitted: auto-generated
- References: <bug-50521-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50521
--- Comment #9 from Henrik NordstrÃm <henrik at henriknordstrom dot net> 2011-10-28 07:32:48 UTC ---
C standard does not define any of this It's all implementation and platform ABI
dependent.
The C standard does define not storage size of a bit-field other than that it's
sufficiently large, or bit-fields of other types than _Bool and int
(+qualifiers), or if bits outside the specific bit-field is accessed as side
effect when operating on a bit-field.
For example the ARM ABI defines volatile bitfield memory access in full detail
as being equal to the base type of the bitfield, and I see now that it actually
requires a double load in the mentioned test case. See
http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042d/IHI0042D_aapcs.pdf
section 7.1.7.5.