PING: [C++-11 PATCH] Trailing comma in enum
Magnus Fromreide
magfr@lysator.liu.se
Sat Oct 29 08:09:00 GMT 2011
Could someone please review this?
On Sun, 2011-10-09 at 16:27 +0200, Magnus Fromreide wrote:
> Hi.
>
> As I understand it C++-11 allows trailing commas in enum definitions.
> Thus I think the following little patch should be included.
>
> /MF
2011-10-09 Magnus Fromreide <magfr@lysator.liu.se>
* gcc/cp/parser.c (cp_parser_enumerator_list): Do not warn about
trailing commas in C++11 mode.
* gcc/testsuite/g++.dg/cpp0x/enum21a.C: Test that enum x { y, } do
generate a pedwarning in c++98-mode.
* gcc/testsuite/g++.dg/cpp0x/enum21b.C: Test that enum x { y, }
don't generate a pedwarning in c++11-mode.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-diff
Type: text/x-patch
Size: 1919 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20111029/0b359bb8/attachment.bin>
More information about the Gcc-patches
mailing list