libstdc++/3916

Eric Blake ebb9@email.byu.edu
Tue Aug 28 17:35:00 GMT 2001


http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3916&database=gcc

> http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/C++STYLE
>[...]
> This is how the web page should appear; I am not in a position to provide the actual
> patch against the file CVS that the web page is generated from.
> 
> {
> space = _ISspace,
> print = _ISprint,
> - cntrl = _IScntrl,
> + cntrl = _IScntrl // no comma for last entry
> };
> -NOT-
> enum { space = _ISspace, print = _ISprint, cntrl = _IScntrl };

It would still be useful to add a comment on the style page drawing
attention to the fact that the final comma is not legal in enums.  That
is a
common mistake to make (I've done it plenty of times), since there are
other situations, like array initialization, where the trailing comma is
legal.

-- 
Eric Blake




More information about the Gcc-bugs mailing list