Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!pasteur!ames!lll-winken!uunet!unh!al712 From: al712@unh.UUCP (Anthony Lapadula) Newsgroups: comp.lang.c Subject: Enumerated types Message-ID: <1152@unh.UUCP> Date: 4 May 89 01:19:42 GMT Distribution: usa Organization: University of New Hampshire, Durham, NH Lines: 23 Are you allowed to 'forward reference' enumerated types? In other words, is this legal? enum a b; /* 'enum a' is not yet defined */ Does 'b' end up as an int, or is this an error? Also, how about this? char *ptr; enum a { b }; /* 'b' has value 0 in expressions, right? */ if (ptr == b) /* Same as (ptr == NULL) ? */ foo(); (I don't have a copy of the ANSI C Draft for reference, and I was born and bred under K&R I.) Thanks, Anthony Lapadula ..uunet!unh!al712