Commit a3879fa1 by Paolo Carlini Committed by Paolo Carlini

re PR c++/59120 ([c++11] ICE with invalid template alias)

/cp
2014-04-28  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/59120
	* parser.c (cp_parser_alias_declaration): Check return value of
	cp_parser_require.

/testsuite
2014-04-28  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/59120
	* g++.dg/cpp0x/alias-decl-43.C: New.

From-SVN: r209857
parent 2cbf2d95
2014-04-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/59120
* parser.c (cp_parser_alias_declaration): Check return value of
cp_parser_require.
2014-04-24 Jakub Jelinek <jakub@redhat.com> 2014-04-24 Jakub Jelinek <jakub@redhat.com>
* parser.c (cp_parser_omp_atomic): Allow seq_cst before * parser.c (cp_parser_omp_atomic): Allow seq_cst before
......
...@@ -16142,15 +16142,8 @@ cp_parser_alias_declaration (cp_parser* parser) ...@@ -16142,15 +16142,8 @@ cp_parser_alias_declaration (cp_parser* parser)
if (parser->num_template_parameter_lists) if (parser->num_template_parameter_lists)
parser->type_definition_forbidden_message = saved_message; parser->type_definition_forbidden_message = saved_message;
if (type == error_mark_node) if (type == error_mark_node
{ || !cp_parser_require (parser, CPP_SEMICOLON, RT_SEMICOLON))
cp_parser_skip_to_end_of_block_or_statement (parser);
return error_mark_node;
}
cp_parser_require (parser, CPP_SEMICOLON, RT_SEMICOLON);
if (cp_parser_error_occurred (parser))
{ {
cp_parser_skip_to_end_of_block_or_statement (parser); cp_parser_skip_to_end_of_block_or_statement (parser);
return error_mark_node; return error_mark_node;
......
2014-04-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/59120
* g++.dg/cpp0x/alias-decl-43.C: New.
2014-03-27 Thomas Koenig <tkoenig@gcc.gnu.org> 2014-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/59604 PR fortran/59604
......
// PR c++/59120
// { dg-do compile { target c++11 } }
template<typename T> using X = int T::T*; // { dg-error "expected" }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment