Created on 2005-05-10.00:00:00 last changed 196 months ago
[Voted into WP at April, 2006 meeting.]
Proposed resolution (October, 2005):
Change the grammar in 9.7.1 [dcl.enum] paragraph 1 as indicated:
enum-specifier:enum identifieropt { enumerator-listopt }
enum identifieropt { enumerator-list , }
The C language (since C99), and some C++ compilers, accept:
enum { FOO, };
as syntactically valid. It would be useful
for machine generated code
for minimising changes when editing
to allow a distinction between the final item being intended as an ordinary item or as a limit:
enum { red, green, blue, num_colours }; // note no comma enum { fred, jim, sheila, }; // last is not special
This proposed change is to permit a trailing comma in enum by adding:
enum identifieropt { enumerator-list , }
as an alternative definition for the enum-specifier nonterminal in 9.7.1 [dcl.enum] paragraph 1.
History | |||
---|---|---|---|
Date | User | Action | Args |
2008-10-05 00:00:00 | admin | set | status: wp -> cd1 |
2006-11-05 00:00:00 | admin | set | status: dr -> wp |
2006-04-22 00:00:00 | admin | set | messages: + msg1364 |
2006-04-22 00:00:00 | admin | set | status: ready -> dr |
2005-10-22 00:00:00 | admin | set | messages: + msg1220 |
2005-10-22 00:00:00 | admin | set | status: open -> ready |
2005-05-10 00:00:00 | admin | create |