+2001-02-22 Mark Mitchell <mark@codesourcery.com>
+
+ * spew.c (yylex): Correct handling of friends.
+
2001-02-22 Mark Mitchell <mark@codesourcery.com>
* mangle.c (write_encoding): Pass write_function_type the
{
int yychr;
int old_looking_for_typename = 0;
+ int just_saw_new = 0;
+ int just_saw_friend = 0;
timevar_push (TV_LEX);
}
/* do_aggr needs to know if the previous token was `friend'. */
else if (nth_token (0)->yylval.ttype == ridpointers[RID_FRIEND])
- after_friend = 1;
+ just_saw_friend = 1;
break;
case NEW:
/* do_aggr needs to know if the previous token was `new'. */
- after_new = 1;
+ just_saw_new = 1;
break;
case TYPESPEC:
case AGGR:
do_aggr ();
- after_friend = after_new = 0;
break;
case ENUM:
break;
}
+ after_friend = just_saw_friend;
+ after_new = just_saw_new;
+
/* class member lookup only applies to the first token after the object
expression, except for explicit destructor calls. */
if (yychr != '~')