Path: utzoo!utgpu!watmath!att!tut.cis.ohio-state.edu!purdue!ames!apple!motcsd!hpda!hpcuhb!hpcllla!hpclisp!hpclwjm!walter From: walter@hpclwjm.HP.COM (Walter Murray) Newsgroups: comp.lang.c Subject: Re: enum implementation Message-ID: <660049@hpclwjm.HP.COM> Date: 27 Jul 89 19:37:41 GMT References: <396@opusys.UUCP> Organization: Hewlett-Packard Calif. Language Lab Lines: 24 R.L.K.Dattatri writes: > Question: What is the standard (ANSI) type of an 'enum' constant? > [quotes from ANSI and K&R] From the rest of your posting, I think you may be confusing the enumerated type with the type of the enumeration constants. Consider the declaration: enum {red, green, blue} color; The identifier 'green' is an enumeration constant and is required to have type int. The identifier 'color' denotes an object which has enumerated type. That type has to be compatible with one of the eight integer types, and an ANSI-conforming implementation must document how that type is chosen. Walter Murray Not speaking for X3J11 ----------------------------------------------------------------------