From: Gabriel Dos Reis Date: Thu, 1 Dec 2005 23:10:27 +0000 (+0000) Subject: parser.c (cp_parser_declaration): Set token2.type to CPP_EOF, not RID_MAX. X-Git-Tag: releases/gcc-4.2.0~5635 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=728cdd0872eb752c12519e4e6c0b4f9fa5d226e1;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index dcd0d3fe8bc7..80c24ddb06b6 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2005-12-01 Gabriel Dos Reis + + * parser.c (cp_parser_declaration): Set token2.type to CPP_EOF, + not RID_MAX. + 2005-11-30 Jason Merrill PR c++/21123 diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 0ea0f93602ef..daec37d896ec 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -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);