Valdis Kletnieks writes:
On Wed, 31 May 2000 14:28:34 +0200, Robert Pluim said:
> Valdis Kletnieks writes:
> > Some compilers (IBM ibmcxx 3.6 for example) don't like trailing commas...
> >
>
> Hmm, I thought that accepting this was mandated by ansi C (I can't
> quote chapter and verse, but I'm sure someone can).
If somebody cites chapter and verse, I'll open a bug report. However,
not having a copy of ANSI in front of me, I'm stuck....
/Valdis
I found this in the draft C9X standard. Can anyone tell us if this was
the same in C90?
6.5.2.2 Enumeration specifiers
Syntax
[#1]
enum-specifier:
enum identifier-opt { enumerator-list }
enum identifier-opt { enumerator-list , }
enum identifier
enumerator-list:
enumerator
enumerator-list , enumerator
enumerator:
enumeration-constant
enumeration-constant = constant-expression
and in 6.5.2.3
[#5] A type specifier of the form
struct-or-union identifier-opt { struct-declaration-list }
or
enum identifier { enumerator-list }
or
enum identifier { enumerator-list , }
declares a structure, union, or enumerated type.
Robert
--
Robert Pluim Voice: +33 4 92 96 17 43
Systems Development Engineer Fax: +33 4 92 96 15 32
Nortel Networks <URL:mailto:rpluim@nortelnetworks.com>