parser.c (cp_parser_declaration): Set token2.type to CPP_EOF, not RID_MAX.

* parser.c (cp_parser_declaration): Set token2.type to CPP_EOF,
        not RID_MAX.

From-SVN: r107838
This commit is contained in:
Gabriel Dos Reis 2005-12-01 23:10:27 +00:00 committed by Gabriel Dos Reis
parent 6cc5062afa
commit 728cdd0872
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2005-12-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
* parser.c (cp_parser_declaration): Set token2.type to CPP_EOF,
not RID_MAX.
2005-11-30 Jason Merrill <jason@redhat.com>
PR c++/21123

View file

@ -6914,7 +6914,10 @@ cp_parser_declaration (cp_parser* parser)
if (token1.type != CPP_EOF)
token2 = *cp_lexer_peek_nth_token (parser->lexer, 2);
else
token2.type = token2.keyword = RID_MAX;
{
token2.type = CPP_EOF;
token2.keyword = RID_MAX;
}
/* Get the high-water mark for the DECLARATOR_OBSTACK. */
p = obstack_alloc (&declarator_obstack, 0);