public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/50671] New: NSDMI not parsed correctly for multiple-data-member declarations
@ 2011-10-09  8:27 miles at gnu dot org
  2011-10-09  9:15 ` [Bug c++/50671] [C++0x] " paolo.carlini at oracle dot com
  0 siblings, 1 reply; 2+ messages in thread
From: miles at gnu dot org @ 2011-10-09  8:27 UTC (permalink / raw)
  To: gcc-bugs

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: unassigned@gcc.gnu.org
        ReportedBy: miles@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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/50671] [C++0x] NSDMI not parsed correctly for multiple-data-member declarations
  2011-10-09  8:27 [Bug c++/50671] New: NSDMI not parsed correctly for multiple-data-member declarations miles at gnu dot org
@ 2011-10-09  9:15 ` paolo.carlini at oracle dot com
  0 siblings, 0 replies; 2+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-09  9:15 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-09 09:15:17 UTC ---
Duplicate.

*** This bug has been marked as a duplicate of bug 50563 ***


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-09  9:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-09  8:27 [Bug c++/50671] New: NSDMI not parsed correctly for multiple-data-member declarations miles at gnu dot org
2011-10-09  9:15 ` [Bug c++/50671] [C++0x] " paolo.carlini at oracle dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).