[C++ RFH/Patch] PR 52892 (and others)

Paolo Carlini paolo.carlini@oracle.com
Tue Aug 26 19:46:00 GMT 2014


Hi,

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.
Ok. I didn't tell you in my first message that I already tried changing 
the 'TREE_TYPE (temp) == type' to 'same_type_p (TREE_TYPE (temp), type)' 
and it works for the simple case I posted, but it doesn't in more 
complex cases, involving templates too. Thus something more complex in 
adjust_temp_type, I suppose...

Paolo.



More information about the Gcc-patches mailing list