[PATCH,c++] convert cp_parser.unparsed_function_queues &co. to VECs
Jason Merrill
jason@redhat.com
Wed Jun 30 20:56:00 GMT 2010
On 06/30/2010 03:10 PM, Nathan Froyd wrote:
> On Wed, Jun 30, 2010 at 02:33:20PM -0400, Jason Merrill wrote:
>> On 06/28/2010 08:27 AM, Nathan Froyd wrote:
>>> Ping. Where does this patch stand? Should I:
>>>
>>> - Commit the original patch?
>>>
>>> - Hold off while you consider what might be wrong with your suggestion?
>>> and/or
>>>
>>> - Debug your suggestion myself in hopes of figuring out what's wrong?
>>
>> The last, if you would. Is DECL_FRIEND_CONTEXT not getting set for f?
>
> Apparently not:
>
> (gdb) p decl->decl_minimal.context
> $4 = (tree) 0x0
That's DECL_CONTEXT, not DECL_FRIEND_CONTEXT; the latter would be
decl->decl_common.lang_specific->u.fn.context, I believe.
In any case, the problem seems to be in do_friend:
> /* 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?
Jason
More information about the Gcc-patches
mailing list