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]

Re: enums and null pointer constants


>>>>> "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

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