Path: utzoo!utgpu!attcan!uunet!husc6!spdcc!ima!haddock!karl From: karl@haddock.ISC.COM (Karl Heuer) Newsgroups: comp.std.c Subject: Re: enums Message-ID: <5514@haddock.ISC.COM> Date: 27 Jul 88 15:17:42 GMT References: <1608@dataio.Data-IO.COM> <8807242307.AA27481@explorer.dgp.toronto.edu> <1615@dataio.Data-IO.COM> Reply-To: karl@haddock.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 12 In article <1608@dataio.Data-IO.COM> bright@Data-IO.COM (Walter Bright) writes: >[ANSI C seems not to allow:] > enum abc { }; /* empty member list */ > enum def { b, }; /* trailing comma */ I can see why one might want to allow the trailing comma, but what good is an enum with no values? I think this is almost in the same category as zero-sized objects. (I.e., the rule that allows small-valued enums to be stored in a char could be logically extended to allow non-valued enums to be stored in a zero-size type.) Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint