r269003 - in /trunk/gcc: cp/ChangeLog cp/conste...
jason@gcc.gnu.org
jason@gcc.gnu.org
Tue Feb 19 01:01:00 GMT 2019
Author: jason
Date: Tue Feb 19 01:01:50 2019
New Revision: 269003
URL: https://gcc.gnu.org/viewcvs?rev=269003&root=gcc&view=rev
Log:
PR c++/89336 - multiple stores in constexpr stmt.
If we evaluate the RHS in the context of the LHS, that evaluation might
change the LHS in ways that mess with being able to store the value later.
So for assignment or scalar values, evaluate the RHS first.
* constexpr.c (cxx_eval_store_expression): Preevaluate scalar or
assigned value.
Added:
trunk/gcc/testsuite/g++.dg/cpp1y/constexpr-89336-1.C
trunk/gcc/testsuite/g++.dg/cpp1y/constexpr-89336-2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/constexpr.c
More information about the Gcc-cvs
mailing list