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]
Other format: [Raw text]

[Bug c++/51888] New: [C++11]warn comma at end of enumerator list with -pedantic


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51888

             Bug #: 51888
           Summary: [C++11]warn comma at end of enumerator list with
                    -pedantic
    Classification: Unclassified
           Product: gcc
           Version: 4.6.3
            Status: UNCONFIRMED
          Severity: trivial
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: flast@flast.jp


GCC warns following code with -pedantic in C++11 mode.
---- testcase.C ----
enum { foo, };
----

GCC says:
----
$ g++ -pedantic -std=c++0x -c testcase.C
testcase.C:1:11: warning: comma at end of enumerator list [-pedantic]
----

C++11 accepts it and should not warn this.


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