Re: C++ PATCH for c++/85032, rejects-valid with if constexpr in template

2018-04-10 Thread Jason Merrill
Ok, thanks. On Apr 10, 2018 4:37 PM, "Marek Polacek" wrote: On Mon, Apr 09, 2018 at 02:18:16PM -0400, Jason Merrill wrote: > On Fri, Apr 6, 2018 at 2:17 PM, Marek Polacek wrote: > > On Mon, Mar 26, 2018 at 01:17:22PM -0400, Jason Merrill wrote: > >> On Sat, Mar 24, 2018 at 6:59 AM, Marek Polace

Re: C++ PATCH for c++/85032, rejects-valid with if constexpr in template

2018-04-10 Thread Marek Polacek
On Mon, Apr 09, 2018 at 02:18:16PM -0400, Jason Merrill wrote: > On Fri, Apr 6, 2018 at 2:17 PM, Marek Polacek wrote: > > On Mon, Mar 26, 2018 at 01:17:22PM -0400, Jason Merrill wrote: > >> On Sat, Mar 24, 2018 at 6:59 AM, Marek Polacek wrote: > >> > Recently the code in finish_static_assert was

Re: C++ PATCH for c++/85032, rejects-valid with if constexpr in template

2018-04-09 Thread Jason Merrill
On Fri, Apr 6, 2018 at 2:17 PM, Marek Polacek wrote: > On Mon, Mar 26, 2018 at 01:17:22PM -0400, Jason Merrill wrote: >> On Sat, Mar 24, 2018 at 6:59 AM, Marek Polacek wrote: >> > Recently the code in finish_static_assert was changed to use >> > perform_implicit_conversion_flags followed by fold_

Re: C++ PATCH for c++/85032, rejects-valid with if constexpr in template

2018-04-06 Thread Marek Polacek
On Mon, Mar 26, 2018 at 01:17:22PM -0400, Jason Merrill wrote: > On Sat, Mar 24, 2018 at 6:59 AM, Marek Polacek wrote: > > Recently the code in finish_static_assert was changed to use > > perform_implicit_conversion_flags followed by fold_non_dependent_expr. That > > broke this test becase when i

Re: C++ PATCH for c++/85032, rejects-valid with if constexpr in template

2018-03-26 Thread Jason Merrill
On Sat, Mar 24, 2018 at 6:59 AM, Marek Polacek wrote: > Recently the code in finish_static_assert was changed to use > perform_implicit_conversion_flags followed by fold_non_dependent_expr. That > broke this test becase when in a template, p_i_c_f merely wraps the expr in > an IMPLICIT_CONV_EXPR.

C++ PATCH for c++/85032, rejects-valid with if constexpr in template

2018-03-24 Thread Marek Polacek
Recently the code in finish_static_assert was changed to use perform_implicit_conversion_flags followed by fold_non_dependent_expr. That broke this test becase when in a template, p_i_c_f merely wraps the expr in an IMPLICIT_CONV_EXPR. fold_non_dependent_expr should be able to fold it to a consta