re PR c++/55250 ([C++0x] enum declarations within constexpr function are allowed...
authorPaolo Carlini <paolo.carlini@oracle.com>
Mon, 6 Oct 2014 16:13:41 +0000 (16:13 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 6 Oct 2014 16:13:41 +0000 (16:13 +0000)
commitfbf833b776811b8ac22c79ee52ff46d578da755b
treefbc115d703cfe8f47d7e0b737588cd7b86e323a5
parentc4b64f5bcac6f7d5e1ae7d3026a3e228fb8adbbd
re PR c++/55250 ([C++0x] enum declarations within constexpr function are allowed, constexpr declarations are not)

/cp
2014-10-06  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/55250
* semantics.c (check_constexpr_bind_expr_vars): New.
(check_constexpr_ctor_body, massage_constexpr_body): Use it.
(build_constexpr_constructor_member_initializers): Handle
BIND_EXPR in the main conditional.

/testsuite
2014-10-06  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/55250
* g++.dg/cpp0x/constexpr-type-decl1.C: New.
* g++.dg/cpp0x/constexpr-type-def1.C: Likewise.
* g++.dg/cpp1y/constexpr-type-def1.C: Likewise.

From-SVN: r215954
gcc/cp/ChangeLog
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/constexpr-type-decl1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/constexpr-type-def1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/constexpr-type-def1.C [new file with mode: 0644]