re PR c++/83921 (GCC rejects constexpr initialization of empty aggregate.)
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 24 Jan 2018 00:57:18 +0000 (00:57 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 24 Jan 2018 00:57:18 +0000 (00:57 +0000)
commit3885527ddf9ea47d0eab8d2c3a503a8e8e01d97d
tree641f7b766de5780ead06404f4d066048faaab748
parent7a007e4485a266005c8d2a8e8236c7c7e05ed27e
re PR c++/83921 (GCC rejects constexpr initialization of empty aggregate.)

/cp
2018-01-23  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/83921
* decl.c (check_for_uninitialized_const_var): Not static; add
bool and tsubst_flags_t parameters; adjust to be used both in
constexpr context and not.
* constexpr.c (potential_constant_expression_1): Use the above.
* cp-tree.h (check_for_uninitialized_const_var): Declare.

/testsuite
2018-01-23  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/83921
* g++.dg/cpp1y/constexpr-83921-1.C: New.
* g++.dg/cpp1y/constexpr-83921-2.C: Likewise.
* g++.dg/cpp1y/constexpr-83921-3.C: Likewise.
* g++.dg/ext/stmtexpr20.C: Likewise.
* g++.dg/ext/stmtexpr21.C: Likewise.

From-SVN: r257009
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/constexpr-83921-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/constexpr-83921-2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/constexpr-83921-3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/stmtexpr20.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/stmtexpr21.C [new file with mode: 0644]