🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5226

Re: enums

#5226
From: Walter Bright
Date: Mon, 25 Jul 1988 18:20
14 lines
1272 bytes
In article <8807242307.AA27481@explorer.dgp.toronto.edu> hugh@dgp.toronto.edu ("D. Hugh Redelmeier") writes:
<In article <1608@dataio.Data-IO.COM< bright@Data-IO.COM (Walter Bright) writes:
<<From reading the grammar for enums in the Ansi spec, it seems that the
<<following is not allowed:
<<	enum abc { };		/* empty member list	*/
<<	enum def { b, };	/* trailing comma	*/
<<Many compilers accept this, and I've run across code that uses it. Any
<<thoughts? Is this an oversight in the spec?
<This is currently legal in the two compilers I use (the Ritchie
<compiler (the original implementation of enum, so it should carry
<some weight), and System V VAX UNIX PCC).  I do use the feature.

I solved the problem in my compiler by allowing it unless the strict
ANSI switch is thrown. Ah well, more warts!
Technical Details
Message-ID: <1615@dataio.Data-IO.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!bloom-beacon!mit-eddie!uw-beaver!uw-june!uw-entropy!dataio!bright
References: <1608@dataio.Data-IO.COM> <8807242307.AA27481@explorer.dgp.toronto.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!bloom-beacon!mit-eddie!uw-beaver!uw-june!uw-entropy!dataio!bright
From: bright@Data-IO.COM (Walter Bright)
Newsgroups: comp.std.c
Subject: Re: enums
Message-ID: <1615@dataio.Data-IO.COM>
Date: 25 Jul 88 18:20:25 GMT
References: <1608@dataio.Data-IO.COM> <8807242307.AA27481@explorer.dgp.toronto.edu>
Reply-To: bright@dataio.Data-IO.COM (Walter Bright)
Organization: Data I/O Corporation; Redmond, WA
Lines: 14