This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: underlying type for enums
- From: "Joseph S. Myers" <jsm at polyomino dot org dot uk>
- To: Jamie Lokier <jamie at shareable dot org>
- Cc: Richard Henderson <rth at redhat dot com>, Jason Merrill <jason at redhat dot com>, gcc at gcc dot gnu dot org
- Date: Wed, 3 Dec 2003 10:16:38 +0000 (UTC)
- Subject: Re: underlying type for enums
- References: <20031202090652.GC32317@redhat.com> <20031203025107.GE27306@mail.shareable.org>
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