/cp
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Oct 2014 19:22:53 +0000 (19:22 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Oct 2014 19:22:53 +0000 (19:22 +0000)
commitf6fccb1222a2abe7aa6ab446b79973396ef5edb1
tree4553766deb632f48b011e507c8e87b13c5f4fcbf
parentd9bbc5efdcb414332a6877e7a5ecbfbe5640f355
/cp
2014-10-09  Paolo Carlini  <paolo.carlini@oracle.com>

* semantics.c (check_constexpr_ctor_body_1): New.
(check_constexpr_ctor_body): Use it; add bool parameter.
(build_data_member_initialization): Handle BIND_EXPR and
USING_STMT in the main conditional.
(build_constexpr_constructor_member_initializers): Do not
handle BIND_EXPR here.
(constexpr_fn_retval): Handle BIND_EXPR in the switch.
(massage_constexpr_body): Don't do it here.
* parser.c (cp_parser_ctor_initializer_opt_and_function_body):
Adjust check_constexpr_ctor_body call.
(cp_parser_compound_statement): Do not pedwarn for compound-statement
in constexpr function in C++14 mode.
* cp-tree.h (check_constexpr_ctor_body): Update declaration.

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

* g++.dg/cpp0x/constexpr-using3.C: New.
* g++.dg/cpp1y/constexpr-local-compound1.C: Likewise.
* g++.dg/cpp1y/constexpr-type-def-compound1.C: Likewise.
* g++.dg/cpp1y/constexpr-local1.C: Extend.
* g++.dg/cpp0x/constexpr-compound.C: Specify expected error.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216049 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/parser.c
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/constexpr-compound.C
gcc/testsuite/g++.dg/cpp0x/constexpr-using3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/constexpr-local-compound1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/constexpr-local1.C
gcc/testsuite/g++.dg/cpp1y/constexpr-type-def-compound1.C [new file with mode: 0644]