]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
parser.c (cp_parser_declaration): Set token2.type to CPP_EOF, not RID_MAX.
authorGabriel Dos Reis <gdr@integrable-solutions.net>
Thu, 1 Dec 2005 23:10:27 +0000 (23:10 +0000)
committerGabriel Dos Reis <gdr@gcc.gnu.org>
Thu, 1 Dec 2005 23:10:27 +0000 (23:10 +0000)
        * parser.c (cp_parser_declaration): Set token2.type to CPP_EOF,
        not RID_MAX.

From-SVN: r107838

gcc/cp/ChangeLog
gcc/cp/parser.c

index dcd0d3fe8bc7949b52a83743b991d69102dacfa9..80c24ddb06b6caf20fef44d130370189e6c24649 100644 (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
index 0ea0f93602eff22674f3efd159fc9ea234481808..daec37d896ec9b12bce73764e9c4f2f3318ab2df 100644 (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);