[C++ Patch] PR 51494 (and 52183)

Jason Merrill jason@redhat.com
Tue Feb 14 01:03:00 GMT 2012

This patch fixes this particular bug, but there are some issues.

First, non_static_member_function_p only checks the first function in 
the overload set, which may not be representative of all of them.  It 
really shouldn't look through OVERLOADs, we need to defer this decision 
until build_over_call.

Second, the uses of maybe_dummy_object in build_offset_ref, 
finish_qualified_id_expr and finish_id_expression could also be dealing 
with static member functions.

The underlying problem here is that we're only supposed to capture a 
variable/this when it is odr-used, which we can't know until we finish 
overload resolution.


More information about the Gcc-patches mailing list