aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/lex.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/lex.c')
-rw-r--r--gcc/cp/lex.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index a80b900..2d5b8b6 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -2806,6 +2806,8 @@ identifier_type (decl)
if (TREE_CODE (decl) == TEMPLATE_DECL
&& DECL_TEMPLATE_IS_CLASS (decl))
return PTYPENAME;
+ if (TREE_CODE (decl) == NAMESPACE_DECL)
+ return NSNAME;
if (TREE_CODE (decl) != TYPE_DECL)
return IDENTIFIER;
return TYPENAME;
@@ -4606,13 +4608,26 @@ handle_sysv_pragma ()
case TYPENAME:
case STRING:
case CONSTANT:
- handle_pragma_token (token_buffer, yylval.ttype);
+ handle_pragma_token ("ignored", yylval.ttype);
+ break;
+ case '(':
+ handle_pragma_token ("(", NULL_TREE);
+ break;
+ case ')':
+ handle_pragma_token (")", NULL_TREE);
+ break;
+ case '=':
+ handle_pragma_token ("=", NULL_TREE);
+ break;
+ case LEFT_RIGHT:
+ handle_pragma_token ("(", NULL_TREE);
+ handle_pragma_token (")", NULL_TREE);
break;
case END_OF_LINE:
handle_pragma_token (NULL_PTR, NULL_TREE);
return;
default:
- handle_pragma_token (token_buffer, NULL_TREE);
+ abort ();
}
}
}