This is the mail archive of the gcc@gcc.gnu.org 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 <schwab@suse.de>
>> Paul Schlie <schlie@comcast.net> 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
6.5.2.1  Structure and union specifiers
...
 Semantics
 ...
       [#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]