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: underlying type for enums


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 (by analogy with sizeof, and if
you allowed just types to escape from structures in this way you'd then
need to deal with declarations of outside objects of such types; using
such types to declare new bit-fields in new structures;  
sizeof(typeof(s.e)); ...).

-- 
Joseph S. Myers
jsm@polyomino.org.uk


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