r267030 - in /trunk/gcc: cp/ChangeLog cp/conste...
mpolacek@gcc.gnu.org
mpolacek@gcc.gnu.org
Tue Dec 11 18:53:00 GMT 2018
Author: mpolacek
Date: Tue Dec 11 18:53:03 2018
New Revision: 267030
URL: https://gcc.gnu.org/viewcvs?rev=267030&root=gcc&view=rev
Log:
PR c++/86608 - reading constexpr volatile variable.
* constexpr.c (potential_constant_expression_1): Check want_rval
instead of checking if we have a decl.
* decl2.c (decl_maybe_constant_var_p): Don't consider volatile
constexpr variables as maybe constant.
* g++.dg/cpp0x/constexpr-volatile2.C: New test.
* g++.dg/cpp0x/pr65327.C: Add dg-error.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-volatile2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/constexpr.c
trunk/gcc/cp/decl2.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/cpp0x/pr65327.C
More information about the Gcc-cvs
mailing list