OSDN Git Service

* parser.c (cp_parser_declaration): Set token2.type to CPP_EOF,
authorgdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 1 Dec 2005 23:10:27 +0000 (23:10 +0000)
committergdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 1 Dec 2005 23:10:27 +0000 (23:10 +0000)
        not RID_MAX.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107838 138bc75d-0d04-0410-961f-82ee72b054a4

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

index dcd0d3f..80c24dd 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 0ea0f93..daec37d 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);