summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/cp/lex.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gcc/cp/lex.c')
-rw-r--r--contrib/gcc/cp/lex.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/contrib/gcc/cp/lex.c b/contrib/gcc/cp/lex.c
index d68957a..c40469c 100644
--- a/contrib/gcc/cp/lex.c
+++ b/contrib/gcc/cp/lex.c
@@ -90,10 +90,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. */
@@ -739,7 +740,7 @@ yyprint (file, yychar, yylval)
switch (yychar)
{
case IDENTIFIER:
- case TYPENAME:
+ case tTYPENAME:
case TYPESPEC:
case PTYPENAME:
case PFUNCNAME:
@@ -977,7 +978,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 */)
@@ -1194,7 +1195,7 @@ do_identifier (token, parsing, args)
tree args;
{
register tree id;
- int lexing = (parsing == 1);
+ int lexing = (parsing == 1 || parsing == 3);
if (! lexing)
id = lookup_name (token, 0);
@@ -1216,7 +1217,7 @@ do_identifier (token, parsing, args)
/* Remember that this name has been used in the class definition, as per
[class.scope0] */
- if (id && parsing)
+ if (id && parsing && parsing != 3)
maybe_note_name_used_in_class (token, id);
if (id == error_mark_node)
OpenPOWER on IntegriCloud