mirror of git://gcc.gnu.org/git/gcc.git
re PR c++/60391 ([c++1y] ICE with auto parameter for operator"")
Fix PR c++/60391 PR c++/60391 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic function scope as per cp_parser_skip_to_end_of_statement. PR c++/60391 * g++.dg/cpp1y/pr60391.C: New testcase. From-SVN: r208624
This commit is contained in:
parent
e318c1e15d
commit
c66f2ba1ba
|
|
@ -1,3 +1,9 @@
|
||||||
|
2014-03-17 Adam Butcher <adam@jessamine.co.uk>
|
||||||
|
|
||||||
|
PR c++/60391
|
||||||
|
* parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic
|
||||||
|
function scope as per cp_parser_skip_to_end_of_statement.
|
||||||
|
|
||||||
2014-03-17 Paolo Carlini <paolo.carlini@oracle.com>
|
2014-03-17 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
PR c++/59571
|
PR c++/59571
|
||||||
|
|
|
||||||
|
|
@ -3225,6 +3225,10 @@ cp_parser_skip_to_end_of_block_or_statement (cp_parser* parser)
|
||||||
{
|
{
|
||||||
int nesting_depth = 0;
|
int nesting_depth = 0;
|
||||||
|
|
||||||
|
/* Unwind generic function template scope if necessary. */
|
||||||
|
if (parser->fully_implicit_function_template_p)
|
||||||
|
finish_fully_implicit_template (parser, /*member_decl_opt=*/0);
|
||||||
|
|
||||||
while (nesting_depth >= 0)
|
while (nesting_depth >= 0)
|
||||||
{
|
{
|
||||||
cp_token *token = cp_lexer_peek_token (parser->lexer);
|
cp_token *token = cp_lexer_peek_token (parser->lexer);
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
2014-03-17 Adam Butcher <adam@jessamine.co.uk>
|
||||||
|
|
||||||
|
PR c++/60391
|
||||||
|
* g++.dg/cpp1y/pr60391.C: New testcase.
|
||||||
|
|
||||||
2014-03-17 Jakub Jelinek <jakub@redhat.com>
|
2014-03-17 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
PR target/60516
|
PR target/60516
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
// PR c++/60391
|
||||||
|
// { dg-do compile { target c++1y } }
|
||||||
|
// { dg-options "" }
|
||||||
|
|
||||||
|
namespace N
|
||||||
|
{
|
||||||
|
int operator"" _X(auto) {} // { dg-error "invalid" }
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace N {}
|
||||||
Loading…
Reference in New Issue