RFA (fold): PATCH for c++/49290 (folding *(T*)(ar+10))

Richard Guenther richard.guenther@gmail.com
Tue Jun 7 14:05:00 GMT 2011


On Tue, Jun 7, 2011 at 3:55 PM, Jason Merrill <jason@redhat.com> wrote:
> On 06/07/2011 06:19 AM, Richard Guenther wrote:
>>
>> I _think_ that you can unconditionally change the code to do
>>
>>   TYPE_MAIN_VARIANT (t1) == TYPE_MAIN_VARIANT (t2)
>>   &&  TYPE_QUALS (t1) == TYPE_QUALS (t2)
>>
>> now, I'm not sure if for the testcase T and unsigned differ in qualifiers.
>> Do they?
>
> Hmm, I think with the changes I made to the testcase they end up with the
> same qualifiers.  But for constexpr I need to handle them having different
> qualifiers, too.

In that case you could do what Jakub suggested - but only for rvalues
of course.  I'm not sure if we already avoid calling the folding where we
require lvalues.

Can't you instead adjust the type you feed to fold_indirect_ref_1 in
the caller in the C++ FE?

Richard.

> Jason
>



More information about the Gcc-patches mailing list