From 1fd4aaf9b13bfb68aba61a66a094e178185482c3 Mon Sep 17 00:00:00 2001 From: zack Date: Thu, 20 Jun 2002 01:30:57 +0000 Subject: 2002-06-19 Akim Demaille * c-parse.in (initelt: identifier ':' initval): Add an empty action to fix a type clash. (aliasdecl, classdef): Add the missing closing `;'. Whitespace changes. * gengtype-yacc.y (typedef_struct): Add an empty action to preevnt $$ = $1 type clashes. cp: * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with decl.h's TYPENAME. * spew.c, lex.c: Adjust. * parse.y (explicit_instantiation): Add empty action to override the default $$ = $1 where it introduces a type clash. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54811 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/lex.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'gcc/cp/lex.c') diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index 6c5112a34d0..ae2cd326ac8 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -86,10 +86,11 @@ extern YYSTYPE yylval; /* the semantic value of the */ int warn_traditional = 0; int flag_digraphs = 1; -/* the declaration found for the last IDENTIFIER token read in. - yylex must look this up to detect typedefs, which get token type TYPENAME, - so it is left around in case the identifier is not a typedef but is - used in a context which makes it a reference to a variable. */ +/* the declaration found for the last IDENTIFIER token read in. yylex + must look this up to detect typedefs, which get token type + tTYPENAME, so it is left around in case the identifier is not a + typedef but is used in a context which makes it a reference to a + variable. */ tree lastiddecl; /* Array for holding counts of the numbers of tokens seen. */ @@ -692,7 +693,7 @@ yyprint (file, yychar, yylval) switch (yychar) { case IDENTIFIER: - case TYPENAME: + case tTYPENAME: case TYPESPEC: case PTYPENAME: case PFUNCNAME: @@ -914,7 +915,7 @@ check_for_missing_semicolon (type) if ((yychar > 255 && yychar != SCSPEC && yychar != IDENTIFIER - && yychar != TYPENAME + && yychar != tTYPENAME && yychar != CV_QUALIFIER && yychar != SELFNAME) || yychar == 0 /* EOF */) -- cgit v1.2.1