2
0
mirror of git://gcc.gnu.org/git/gcc.git synced 2025-04-25 08:30:39 +08:00

re PR c++/39053 (ICE with broken function declaration)

/cp
2009-02-01  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/39053
	* parser.c (cp_parser_pure_specifier): If there are no tokens left
	do not call cp_lexer_consume_token.

/testsuite
2009-02-01  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/39053
	* g++.dg/parse/crash52.C: New.

From-SVN: r143861
This commit is contained in:
Paolo Carlini 2009-02-02 00:41:52 +00:00 committed by Paolo Carlini
parent 27c40174ae
commit def88a88c4
4 changed files with 21 additions and 1 deletions
gcc

@ -1,3 +1,9 @@
2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/39053
* parser.c (cp_parser_pure_specifier): If there are no tokens left
do not call cp_lexer_consume_token.
2009-01-30 Jakub Jelinek <jakub@redhat.com>
PR c++/39028

@ -15997,7 +15997,13 @@ cp_parser_pure_specifier (cp_parser* parser)
if (!cp_parser_require (parser, CPP_EQ, "%<=%>"))
return error_mark_node;
/* Look for the `0' token. */
token = cp_lexer_consume_token (parser->lexer);
token = cp_lexer_peek_token (parser->lexer);
if (token->type == CPP_EOF
|| token->type == CPP_PRAGMA_EOL)
return error_mark_node;
cp_lexer_consume_token (parser->lexer);
/* Accept = default or = delete in c++0x mode. */
if (token->keyword == RID_DEFAULT

@ -1,3 +1,8 @@
2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/39053
* g++.dg/parse/crash52.C: New.
2009-01-30 Richard Guenther <rguenther@suse.de>
PR tree-optimization/39041

@ -0,0 +1,3 @@
// PR c++/39053
void foo() = // { dg-error "initialized|expected" }