diff options
Diffstat (limited to 'gcc/cp/lex.c')
-rw-r--r-- | gcc/cp/lex.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index 183efd72ca5..4558940d675 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -263,7 +263,8 @@ init_operators () : &operator_name_info[(int) CODE]); \ oni->identifier = identifier; \ oni->name = NAME; \ - oni->mangled_name = MANGLING; + oni->mangled_name = MANGLING; \ + oni->arity = ARITY; #include "operators.def" #undef DEF_OPERATOR @@ -540,7 +541,7 @@ const short rid_to_yy[RID_MAX] = /* RID_REINTCAST */ REINTERPRET_CAST, /* RID_STATCAST */ STATIC_CAST, - /* Objective C */ + /* Objective-C */ /* RID_ID */ 0, /* RID_AT_ENCODE */ 0, /* RID_AT_END */ 0, @@ -1073,7 +1074,7 @@ do_pending_lang_change () pop_lang_context (); } -/* Return true if d is in a global scope. */ +/* Return true if d is in a global scope. */ static int is_global (d) @@ -1135,7 +1136,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); @@ -1157,7 +1158,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) |