Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ucbcad.UUCP Path: utzoo!linus!decvax!tektronix!ucbcad!notes From: notes@ucbcad.UUCP Newsgroups: net.lang.c Subject: sizeof (enum) == ? - (nf) Message-ID: <553@ucbcad.UUCP> Date: Wed, 26-Oct-83 14:03:11 EDT Article-I.D.: ucbcad.553 Posted: Wed Oct 26 14:03:11 1983 Date-Received: Thu, 27-Oct-83 22:29:01 EDT Sender: notes@ucbcad.UUCP Organization: UC Berkeley CAD Group Lines: 14 #N:ucbesvax:4800029:000:459 ucbesvax!turner Oct 26 05:51:00 1983 I have a question about enum types. What size are they? Ritchie says that his compiler treats them as ints. But what about pcc? Are they sizeof int or sizeof char *? The latter would be preferable to me, since I am using enum's to hide pointers from the users of a package; for this to work across all machines, enum types must be (at least) as large as the largest possible pointer- size. Thanks in advance, Michael Turner (ucbvax!ucbesvax.turner)