Path: utzoo!attcan!uunet!husc6!bloom-beacon!mcgill-vision!iros1!vedge!lai From: lai@vedge.UUCP (David Lai) Newsgroups: comp.std.c Subject: are enums integers in ANSI? Keywords: enum int Message-ID: <2005@vedge.UUCP> Date: 22 Nov 88 19:42:09 GMT Organization: Visual Edge Software, St. Laurent, Quebec Lines: 25 C: A Reference Manual (Harbison and Steele) says: Draft Proposed ANSI C and most current implementations mandate that all enumeration types be treated as integer types, and that all enumeration constants appearing in expressions have type int. Does this mean: int a; enum { abc, def} b; enum {ghi, jkl} c; b=a; a=b; a=abc; c=abc; b=c; are legal, or are explicit casts necessary? The sun compiler likes to complain, will ANSI compilers complain? -- "What is a DJ if he can't scratch?" - Uncle Jamms Army The views expressed are those of the author, and not of Visual Edge, nor Usenet. David Lai (vedge!lai@larry.mcrcim.mcgill.edu || ...watmath!onfcanim!vedge!lai)