Re: C++ PATCH for c++/85847, ICE with template_id_expr in new()

2018-05-24 Thread Jason Merrill
OK. On Wed, May 23, 2018 at 4:27 PM, Marek Polacek wrote: > On Wed, May 23, 2018 at 03:24:20PM -0400, Jason Merrill wrote: >> On Wed, May 23, 2018 at 2:50 PM, Marek Polacek wrote: >> > On Wed, May 23, 2018 at 12:45:11PM -0400, Jason Merrill wrote: >> >>

Re: C++ PATCH for c++/85847, ICE with template_id_expr in new()

2018-05-23 Thread Marek Polacek
On Wed, May 23, 2018 at 03:24:20PM -0400, Jason Merrill wrote: > On Wed, May 23, 2018 at 2:50 PM, Marek Polacek wrote: > > On Wed, May 23, 2018 at 12:45:11PM -0400, Jason Merrill wrote: > >> On Wed, May 23, 2018 at 9:46 AM, Marek Polacek wrote: > >> > The

Re: C++ PATCH for c++/85847, ICE with template_id_expr in new()

2018-05-23 Thread Jason Merrill
On Wed, May 23, 2018 at 2:50 PM, Marek Polacek wrote: > On Wed, May 23, 2018 at 12:45:11PM -0400, Jason Merrill wrote: >> On Wed, May 23, 2018 at 9:46 AM, Marek Polacek wrote: >> > The diagnostic code in build_new{,_1} was using maybe_constant_value to >>

Re: C++ PATCH for c++/85847, ICE with template_id_expr in new()

2018-05-23 Thread Marek Polacek
On Wed, May 23, 2018 at 12:45:11PM -0400, Jason Merrill wrote: > On Wed, May 23, 2018 at 9:46 AM, Marek Polacek wrote: > > The diagnostic code in build_new{,_1} was using maybe_constant_value to fold > > the array length, but that breaks while parsing a template, because we

Re: C++ PATCH for c++/85847, ICE with template_id_expr in new()

2018-05-23 Thread Jason Merrill
On Wed, May 23, 2018 at 9:46 AM, Marek Polacek wrote: > The diagnostic code in build_new{,_1} was using maybe_constant_value to fold > the array length, but that breaks while parsing a template, because we might > then leak template codes to the constexpr machinery. > >

C++ PATCH for c++/85847, ICE with template_id_expr in new()

2018-05-23 Thread Marek Polacek
The diagnostic code in build_new{,_1} was using maybe_constant_value to fold the array length, but that breaks while parsing a template, because we might then leak template codes to the constexpr machinery. Bootstrapped/regtested on x86_64-linux, ok for trunk/8? 2018-05-23 Marek Polacek