Re: C++ PATCH for c++/89705 - ICE with reference binding with conversion function

2019-03-24 Thread Jason Merrill
On 3/22/19 5:29 PM, Marek Polacek wrote: On Thu, Mar 21, 2019 at 07:41:37PM -0400, Jason Merrill wrote: On 3/21/19 4:55 PM, Marek Polacek wrote: On Thu, Mar 21, 2019 at 04:13:29PM -0400, Jason Merrill wrote: On 3/16/19 4:53 PM, Marek Polacek wrote: Here we have code like struct X { oper

Re: C++ PATCH for c++/89705 - ICE with reference binding with conversion function

2019-03-22 Thread Marek Polacek
On Thu, Mar 21, 2019 at 07:41:37PM -0400, Jason Merrill wrote: > On 3/21/19 4:55 PM, Marek Polacek wrote: > > On Thu, Mar 21, 2019 at 04:13:29PM -0400, Jason Merrill wrote: > > > On 3/16/19 4:53 PM, Marek Polacek wrote: > > > > Here we have code like > > > > > > > > struct X { operator const i

Re: C++ PATCH for c++/89705 - ICE with reference binding with conversion function

2019-03-21 Thread Jason Merrill
On 3/21/19 4:55 PM, Marek Polacek wrote: On Thu, Mar 21, 2019 at 04:13:29PM -0400, Jason Merrill wrote: On 3/16/19 4:53 PM, Marek Polacek wrote: Here we have code like struct X { operator const int(); }; int&& rri = X(); which I think is invalid, because [dcl.init.ref] says that if ty

Re: C++ PATCH for c++/89705 - ICE with reference binding with conversion function

2019-03-21 Thread Marek Polacek
On Thu, Mar 21, 2019 at 04:13:29PM -0400, Jason Merrill wrote: > On 3/16/19 4:53 PM, Marek Polacek wrote: > > Here we have code like > > > >struct X { operator const int(); }; > >int&& rri = X(); > > > > which I think is invalid, because [dcl.init.ref] says that if types T1 and > > T2 >

Re: C++ PATCH for c++/89705 - ICE with reference binding with conversion function

2019-03-21 Thread Jason Merrill
On 3/16/19 4:53 PM, Marek Polacek wrote: Here we have code like struct X { operator const int(); }; int&& rri = X(); which I think is invalid, because [dcl.init.ref] says that if types T1 and T2 are reference-related, no qualifiers can be dropped, and if the reference is an rvalue referen

C++ PATCH for c++/89705 - ICE with reference binding with conversion function

2019-03-16 Thread Marek Polacek
Here we have code like struct X { operator const int(); }; int&& rri = X(); which I think is invalid, because [dcl.init.ref] says that if types T1 and T2 are reference-related, no qualifiers can be dropped, and if the reference is an rvalue reference, the initializer expression can't be an lv