summaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
authorgdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2005-12-01 23:10:27 +0000
committergdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2005-12-01 23:10:27 +0000
commit0f80318756385c3ff66a82ebb6b24f5164745ae3 (patch)
treeef5963bd4892fd2ee3c9cf51df30c1e7dde3259f /gcc/cp/parser.c
parentff1826ae160296dc92a659b00743edb354f765dd (diff)
downloadgcc-0f80318756385c3ff66a82ebb6b24f5164745ae3.tar.gz
* parser.c (cp_parser_declaration): Set token2.type to CPP_EOF,
not RID_MAX. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107838 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r--gcc/cp/parser.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 0ea0f93602e..daec37d896e 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);