Re: [PATCH v2] c++: wrong error with constexpr COMPOUND_EXPR [PR105321]

2022-04-21 Thread Marek Polacek via Gcc-patches
On Thu, Apr 21, 2022 at 04:22:03PM +0200, Jakub Jelinek wrote: > On Thu, Apr 21, 2022 at 09:20:48AM -0400, Marek Polacek via Gcc-patches wrote: > > --- a/gcc/cp/constexpr.cc > > +++ b/gcc/cp/constexpr.cc > > @@ -4566,19 +4566,18 @@ cxx_eval_bit_cast (const constexpr_ctx *ctx, tree > > t, bool *non

Re: [PATCH v2] c++: wrong error with constexpr COMPOUND_EXPR [PR105321]

2022-04-21 Thread Jason Merrill via Gcc-patches
Yes, also ok with that change. On Thu, Apr 21, 2022, 10:22 AM Jakub Jelinek wrote: > On Thu, Apr 21, 2022 at 09:20:48AM -0400, Marek Polacek via Gcc-patches > wrote: > > --- a/gcc/cp/constexpr.cc > > +++ b/gcc/cp/constexpr.cc > > @@ -4566,19 +4566,18 @@ cxx_eval_bit_cast (const constexpr_ctx *ct

Re: [PATCH v2] c++: wrong error with constexpr COMPOUND_EXPR [PR105321]

2022-04-21 Thread Jakub Jelinek via Gcc-patches
On Thu, Apr 21, 2022 at 09:20:48AM -0400, Marek Polacek via Gcc-patches wrote: > --- a/gcc/cp/constexpr.cc > +++ b/gcc/cp/constexpr.cc > @@ -4566,19 +4566,18 @@ cxx_eval_bit_cast (const constexpr_ctx *ctx, tree t, > bool *non_constant_p, > static tree > cxx_eval_logical_expression (const constex

Re: [PATCH v2] c++: wrong error with constexpr COMPOUND_EXPR [PR105321]

2022-04-21 Thread Jason Merrill via Gcc-patches
Ok. On Thu, Apr 21, 2022, 9:20 AM Marek Polacek wrote: > On Thu, Apr 21, 2022 at 08:56:23AM -0400, Jason Merrill wrote: > > On 4/20/22 18:40, Marek Polacek wrote: > > > Here we issue a bogus error for the first assert in the test. Therein > > > we have > > > > > > = (void) (VIEW_CONVERT_EXPR(y

[PATCH v2] c++: wrong error with constexpr COMPOUND_EXPR [PR105321]

2022-04-21 Thread Marek Polacek via Gcc-patches
On Thu, Apr 21, 2022 at 08:56:23AM -0400, Jason Merrill wrote: > On 4/20/22 18:40, Marek Polacek wrote: > > Here we issue a bogus error for the first assert in the test. Therein > > we have > > > > = (void) (VIEW_CONVERT_EXPR(yes) || handle_error ());, > > VIEW_CONVERT_EXPR(value); > > > > whi