This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: c: Bitfield fixes for PRs 3325, 3326
Graham Stott <grahams@redhat.com> writes:
> Neil,
>
> I don't have a copy of the C standards handy but I thought anonymous
> zero width bit-fields were valid and useful (i.e. causes next bit-field
> to be located on next boundary)
You remember correctly , 6.7.2.1 specifies:
[#11] A bit-field declaration with no declarator, but only a
colon and a width, indicates an unnamed bit-field.105) As a
special case, a bit-field structure member with a width of 0
indicates that no further bit-field is to be packed into the
unit in which the previous bit-field, if any, was placed.
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj