summaryrefslogtreecommitdiff
path: root/gcc/cp/lex.c
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2002-06-20 01:30:57 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2002-06-20 01:30:57 +0000
commit1fd4aaf9b13bfb68aba61a66a094e178185482c3 (patch)
tree8b5f9fd70b4180372f458c943cf1efac75257426 /gcc/cp/lex.c
parent296a0f5481a22db26ec64cdae58c393df157e516 (diff)
downloadgcc-1fd4aaf9b13bfb68aba61a66a094e178185482c3.tar.gz
2002-06-19 Akim Demaille <akim@epita.fr>
* 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
Diffstat (limited to 'gcc/cp/lex.c')
-rw-r--r--gcc/cp/lex.c13
1 files changed, 7 insertions, 6 deletions
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 */)