This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/81073] [5/6/7/8 Regression] link failure as C++ misses to instanciate some objects
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 19 Jun 2017 18:20:42 +0000
- Subject: [Bug c++/81073] [5/6/7/8 Regression] link failure as C++ misses to instanciate some objects
- Auto-submitted: auto-generated
- References: <bug-81073-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81073
--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Mon Jun 19 18:20:10 2017
New Revision: 249382
URL: https://gcc.gnu.org/viewcvs?rev=249382&root=gcc&view=rev
Log:
PR c++/81073 - constexpr and static var in statement-expression.
* typeck2.c (store_init_value): Always call
require_potential_constant_expression.
* pt.c (convert_nontype_argument): Likewise.
* constexpr.c (potential_constant_expression_1): Adjust message.
Use decl_maybe_constant_var_p instead of decl_constant_var_p.
* decl2.c (decl_maybe_constant_var_p): Consider initializer.
Added:
trunk/gcc/testsuite/g++.dg/ext/stmtexpr19.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/constexpr.c
trunk/gcc/cp/decl2.c
trunk/gcc/cp/pt.c
trunk/gcc/cp/typeck2.c
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-diag1.C
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-trivial2.C