public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/56702] New: <: wrongly considered an alternative token for template argument list using global name specifier
@ 2013-03-23 22:48 mmehlich at semanticdesigns dot com
  2013-03-23 23:13 ` [Bug c++/56702] " paolo.carlini at oracle dot com
  0 siblings, 1 reply; 2+ messages in thread
From: mmehlich at semanticdesigns dot com @ 2013-03-23 22:48 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56702
           Summary: <: wrongly considered an alternative token for
                    template argument list using global name specifier
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: mmehlich@semanticdesigns.com


According to 2.5, paragraph 3, second item in list the character sequence
'<:' in the following example is not a alternative token/digraph,
but < is a separate token. Thus, this should not cause an error.
(Note: This is different from C++98.)

Example code:

class X { };
template<typename> class Y { };

Y<::X> y;

Command line and gcc 4.7.2 error message:
>>> cp fail.cpp gcc -std=c++11 test.cpp
test.cpp:4:2: error: '<::' cannot begin a template-argument list [-fpermissive]
test.cpp:4:2: note: '<:' is an alternate spelling for '['. Insert whitespace
between '<' and '::'
test.cpp:4:2: note: (if you use '-fpermissive' G++ will accept your code)


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

* [Bug c++/56702] <: wrongly considered an alternative token for template argument list using global name specifier
  2013-03-23 22:48 [Bug c++/56702] New: <: wrongly considered an alternative token for template argument list using global name specifier mmehlich at semanticdesigns dot com
@ 2013-03-23 23:13 ` paolo.carlini at oracle dot com
  0 siblings, 0 replies; 2+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-03-23 23:13 UTC (permalink / raw)
  To: gcc-bugs


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

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> 2013-03-23 23:12:57 UTC ---
Dup.

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


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

end of thread, other threads:[~2013-03-23 23:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-23 22:48 [Bug c++/56702] New: <: wrongly considered an alternative token for template argument list using global name specifier mmehlich at semanticdesigns dot com
2013-03-23 23:13 ` [Bug c++/56702] " 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).