Hi again,
On 08/26/2014 08:58 PM, Jason Merrill wrote:
On 08/26/2014 12:01 PM, Paolo Carlini wrote:
the difference, for the latter and for more complex cases, is that
adjust_temp_type calls cp_fold_convert which ends up returning a
NOP_EXPR (eg, build in fold_convert_loc).
Perhaps we should address this in adjust_temp_type, either by ignoring
the conversion to a canonically equivalent type or by directly
changing the type of the ADDR_EXPR.
A big issue is that in some more complex cases, like the oiriginal
testcase in c++/52892, cxx_eval_call_expression gets a fun which is
*already* a NOP_EXPR. Because NOP_EXPRs can be generated quite early,
for example via cp_build_indirect_ref -> decay_conversion -> build_nop
or later via build_special_member_call -> build_dummy_object.
As soon as a NOP_EXPR infiltrates cxx_eval_call_expression it doesn't
see anymore the ADDR_EXPR hidden inside and the game is over. Thus, what
would be the strategy in such cases: NOP_EXPRs should not reach
cxx_eval_call_expression at all?!? Removed earlier? Any tips about the
proper place to do that?
Thanks!
Paolo.