[Bug c++/105737] Incorrect evaluation order in new expression
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu May 26 09:10:29 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105737
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|needs-bisection |
Status|UNCONFIRMED |NEW
Last reconfirmed| |2022-05-26
Ever confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
It was fixed by r12-6325
c++: don't preevaluate new-initializer
The preevaluation code was causing trouble with my fix for PR94041, and now
I see that it's actually wrong since P0145 was adopted for C++17, mandating
order of evaluation for many expressions that were previously unspecified.
I don't see a need to preserve the preevaluation code for older standard
modes.
gcc/cp/ChangeLog:
* init.c (build_new_1): Remove preevaluation code.
gcc/testsuite/ChangeLog:
* g++.old-deja/g++.martin/new1.C: Don't expect preeval.
* g++.dg/tree-ssa/stabilize1.C: Removed.
More information about the Gcc-bugs
mailing list