Re: [PATCH] c++: Add support for __real__/__imag__ modifications in constant expressions [PR88174]

2022-06-10 Thread Jakub Jelinek via Gcc-patches
On Fri, Jun 10, 2022 at 01:27:28PM -0400, Jason Merrill wrote: > > --- gcc/cp/constexpr.cc.jj 2022-06-08 08:21:02.973448193 +0200 > > +++ gcc/cp/constexpr.cc 2022-06-08 17:13:04.986040449 +0200 > > @@ -5707,6 +5707,20 @@ cxx_eval_store_expression (const constex > > } > > break; > >

Re: [PATCH] c++: Add support for __real__/__imag__ modifications in constant expressions [PR88174]

2022-06-10 Thread Jason Merrill via Gcc-patches
On 6/9/22 04:37, Jakub Jelinek wrote: Hi! We claim we support P0415R1 (constexpr complex), but e.g. #include constexpr bool foo () { std::complex a (1.0, 2.0); a += 3.0; a.real (6.0); return a.real () == 6.0 && a.imag () == 2.0; } static_assert (foo ()); fails with test.C:12:20:

[PATCH] c++: Add support for __real__/__imag__ modifications in constant expressions [PR88174]

2022-06-09 Thread Jakub Jelinek via Gcc-patches
Hi! We claim we support P0415R1 (constexpr complex), but e.g. #include constexpr bool foo () { std::complex a (1.0, 2.0); a += 3.0; a.real (6.0); return a.real () == 6.0 && a.imag () == 2.0; } static_assert (foo ()); fails with test.C:12:20: error: non-constant condition for static ass