diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2013-01-04 15:30:24 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2013-01-04 15:30:24 +0000 |
commit | 1582c67762711468720324ddbfd6c305b7eee6b1 (patch) | |
tree | d61301d5651cc179c551709fc872680586529a30 /gcc | |
parent | 361618ec53c981befde38b89365712c7ebe65abb (diff) | |
download | gcc-1582c67762711468720324ddbfd6c305b7eee6b1.zip gcc-1582c67762711468720324ddbfd6c305b7eee6b1.tar.gz gcc-1582c67762711468720324ddbfd6c305b7eee6b1.tar.bz2 |
PR c++/54526 (again)
/libcpp
2013-01-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54526 (again)
* lex.c (_cpp_lex_direct): In C++11 mode, implement 2.5 p3, bullet 2.
/gcc/cp
2013-01-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54526 (again)
* parser.c (cp_parser_template_id): Revert core of previous change
(keep adjusted inform message).
/gcc/testsuite
2013-01-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54526 (again)
* g++.dg/cpp0x/parse2.C: Extend.
* g++.old-deja/g++.other/crash28.C: Adjust.
From-SVN: r194909
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/parser.c | 10 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/parse2.C | 3 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/crash28.C | 2 |
5 files changed, 20 insertions, 7 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 4b7968a..0aef08d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2013-01-04 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/54526 (again) + * parser.c (cp_parser_template_id): Revert core of previous change + (keep adjusted inform message). + 2013-01-03 Jason Merrill <jason@redhat.com> PR c++/55419 diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 3dc2ec6..872d419 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -1,6 +1,6 @@ /* C++ Parser. Copyright (C) 2000, 2001, 2002, 2003, 2004, - 2005, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. + 2005, 2007-2013 Free Software Foundation, Inc. Written by Mark Mitchell <mark@codesourcery.com>. This file is part of GCC. @@ -12655,11 +12655,9 @@ cp_parser_template_id (cp_parser *parser, return error_mark_node; } /* Otherwise, emit an error about the invalid digraph, but continue - parsing because we got our argument list. In C++11 do not emit - any error, per 2.5/3. */ - if (cxx_dialect < cxx0x - && permerror (next_token->location, - "%<<::%> cannot begin a template-argument list")) + parsing because we got our argument list. */ + if (permerror (next_token->location, + "%<<::%> cannot begin a template-argument list")) { static bool hint = false; inform (next_token->location, diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1ce0571..ceba87b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2013-01-04 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/54526 (again) + * g++.dg/cpp0x/parse2.C: Extend. + * g++.old-deja/g++.other/crash28.C: Adjust. + 2013-01-04 Richard Biener <rguenther@suse.de> PR tree-optimization/55862 diff --git a/gcc/testsuite/g++.dg/cpp0x/parse2.C b/gcc/testsuite/g++.dg/cpp0x/parse2.C index eea6b41..77ea14a 100644 --- a/gcc/testsuite/g++.dg/cpp0x/parse2.C +++ b/gcc/testsuite/g++.dg/cpp0x/parse2.C @@ -10,3 +10,6 @@ int main() { X<::A> x; } + +int a; +bool b = 0<::a; diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash28.C b/gcc/testsuite/g++.old-deja/g++.other/crash28.C index 59f1e84..c0f4bfa 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/crash28.C +++ b/gcc/testsuite/g++.old-deja/g++.other/crash28.C @@ -31,5 +31,5 @@ public: }; void foo::x() throw(bar) { - if (!b) throw bar (static_cast<::N::X*>(this)); // { dg-error "lambda expressions|expected" } parse error + if (!b) throw bar (static_cast<::N::X*>(this)); // { dg-error "lambda expressions|expected|invalid" } parse error } |