This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/33823] bitfields on packed struct aligns by a few bits if the types differ
- From: "alexandre dot nunes at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Oct 2007 12:20:16 -0000
- Subject: [Bug c/33823] bitfields on packed struct aligns by a few bits if the types differ
- References: <bug-33823-15246@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from alexandre dot nunes at gmail dot com 2007-10-20 12:20 -------
(In reply to comment #2)
> The standard puts all the burden on the implementation (See 6.7.2.1/10).
> The GCC manual in turn says the behavior is specified by the ABI (4.9
> Structures, unions, enumerations, and bit-fields), which would be the sysv ABI
> which I
> don't have handy right now.
>
Does the ABI dictates the case of how gcc should *pack* the structures? I've
seem that gcc packs structures in a very similar (if not identical) fashion on
some targets (ix86-linux-gnu, arm-elf, mingw without -mms-bitfields, at least),
are they covered by sysv ABI too? Is it a default on gcc whenever the target
has no particular semantics (as arm-elf, which I suppose does not derive from
the ARM published ABIs at all)?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33823