Re: [C++ Patch] PR 57599

2013-06-13 Thread Jason Merrill
OK. Jason

Re: [C++ Patch] PR 57599

2013-06-13 Thread Paolo Carlini
Hi again, On 06/13/2013 03:51 PM, Jason Merrill wrote: Perhaps we should hand off to build_static_cast in the case described by the comment, rather than duplicate the logic. Thus I have regression tested successfully the below. Thanks, Paolo. /cp 2013-06-13 Paolo

Re: [C++ Patch] PR 57599

2013-06-13 Thread Paolo Carlini
Hi, Jason Merrill ha scritto: >On 06/12/2013 08:49 PM, Paolo Carlini wrote: >> +/* Add any qualifier conversions. */ >> +return build_nop (type, expr); > >For a cast to reference type, this will produce an rvalue rather than >an lvalue. Ah, thanks a lot for the clarification. Admitte

Re: [C++ Patch] PR 57599

2013-06-13 Thread Jason Merrill
On 06/12/2013 08:49 PM, Paolo Carlini wrote: + /* Add any qualifier conversions. */ + return build_nop (type, expr); For a cast to reference type, this will produce an rvalue rather than an lvalue. Perhaps we should hand off to build_static_cast in the case described by the com

Re: [C++ Patch] PR 57599

2013-06-13 Thread Paolo Carlini
... in any case, I propose to also add to /cpp0x this testcase suggested by Daniel. Thanks, Paolo. 7 Index: g++.dg/cpp0x/dyncast1.C === --- g++.dg/cpp0x/dyncast1.C (revision 0) +++ g++.dg/cpp0x/dyncast1.C (w

[C++ Patch] PR 57599

2013-06-12 Thread Paolo Carlini
Hi, this dynamic_cast bug, which just came in, notices that in the simple case of static conversion we forget to perform the cv-qualifier conversions. It seems to me that we are missing a build_nop. I extended quite a bit the testcase, to references too, because at some point I got those wro