Article View: comp.std.c
Article #5237Re: enums
From: Karl Heuer
Date: Wed, 27 Jul 1988 15:17
Date: Wed, 27 Jul 1988 15:17
12 lines
1034 bytes
1034 bytes
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
Technical Details
Message-ID:
<5514@haddock.ISC.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!husc6!spdcc!ima!haddock!karlReferences:
<1608@dataio.Data-IO.COM> <8807242307.AA27481@explorer.dgp.toronto.edu> <1615@dataio.Data-IO.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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