This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: G++ enums 'underlying type'
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Paul Schlie <schlie at comcast dot net>
- Cc: <gcc at gcc dot gnu dot org>
- Date: 29 Dec 2004 23:02:47 +0100
- Subject: Re: G++ enums 'underlying type'
- Organization: Integrable Solutions
- References: <BDF88F83.86B2%schlie@comcast.net>
Paul Schlie <schlie@comcast.net> writes:
| Agreed, to clarify: an enumeration (enumerated type, i.e. enum)
| representation need be no larger than the smallest compatible integer
| type, which I believe was the question. Enumerators, as you've noted
| above are specified as int sized constants during an enumeration's
| declaration, as it's unknown until the declaration is completed what
| the range, therefore necessary size, of the enumeration and it's
| correspondingly member representations need be.
|
| We agree?
No.
Enumerators are for type ints in C. They are of type enumeration in C++.
-- Gaby