underlying type for enums

Jamie Lokier jamie@shareable.org
Wed Dec 3 14:05:00 GMT 2003


Joseph S. Myers wrote:
> On Wed, 3 Dec 2003, Jamie Lokier wrote:
> 
> >     struct { E e : 2; unsigned f : 1; } s;
> 
> >     s.e = (__typeof__(s.e)) e2;
> 
> We just disallowed typeof on bit-fields

You are right.  Please excuse the sloppy example :)
I meant to write:

        s.e = e2;

-- Jamie



More information about the Gcc mailing list