This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: libstdc++/3916


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]