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

             Bug #: 50671
           Summary: NSDMI not parsed correctly for multiple-data-member
                    declarations
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: mi...@gnu.org


The new NSDMI support seems to work generally, but the following gives a syntax
error:

   struct X { int i = 3, j = 4; };

$ g++-snapshot -c -std=c++0x i.cc
i.cc:1:21: error: expected ';' before ',' token

It certainly seems like this _should_ be valid code, and the clang trunk
compiles it fine.

If I split the declaration, like "struct X { int i = 3; int j = 4; }", gcc
compiles it as expected.

$ g++-snapshot --version
g++ (Debian 20111008-1) 4.7.0 20111008 (experimental) [trunk revision 179709]

Thanks,

-miles

Reply via email to