This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
/* Friends must all go through the overload machinery, even though they may not technically be overloaded.
Note that because classes all wind up being top-level in their scope, their friend wind up in top-level scope as well. */ if (funcdef_flag) SET_DECL_FRIEND_CONTEXT (decl, current_class_type);
What happens if you remove the if?
If I set funcdef_flag to true at the start of do_friend when f is getting defined, things work as expected. grokdeclarator attempts to grok f in FIELD context, which explains why funcdef_flag doesn't get set in grokdeclarator.
What's the right fix? Presumably the test shouldn't be removed in do_friend...should grokdeclarator be checking declarator->kind?
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |