This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: enums and null pointer constants
- To: kenner at vlsi1 dot ultra dot nyu dot edu
- Subject: Re: enums and null pointer constants
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Mon, 22 May 2000 22:49:33 -0700
- Cc: zack at wolery dot cumb dot org, gcc at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <10005222222.AA26050@vlsi1.ultra.nyu.edu>
>>>>> "Richard" == Richard Kenner <kenner@vlsi1.ultra.nyu.edu> writes:
Richard> I disagree. It clearly says an integer constant
Richard> expression shall have integer type. It is only its
Richard> *operand* that can be enumeration constants. The
Richard> expression itself cannot have an enumeration type.
C9X 6.1.3.3:
An identifier declared as an enumeration constant has type int.
6.5.2.2:
The identifiers in an enumerator list are declared as constants that
have type int and may appear wherever such are permitted.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com