This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: typeof and bitfields

> From: Andreas Schwab <>
>> Paul Schlie <> writes:
>> Understand that it's not formally supported in C's syntax specification, but
>> curiously nor is the definition of struct { :3; }, although the text seems
>> to implies it defines a struct containing an 3-bit unnamed (and unspecified)
>> integer type?
> There is nothing in the semantics section that allows such a syntax.


6.5.2  Type specifiers  Structure and union specifiers
       [#10] A bit-field declaration with no declarator, but only a
       colon and a width, indicates an unnamed bit-field.92   As  a
       special  case  of  this, 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.

(or do you mean there's nothing implying it's acceptable to be typedef'ed?
 as was just noting that since a nameless bit-field may be declared in such
 a way, then it would seem to follow that it may be typedef'ed analogously?)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]