PR c++/50248
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 5 Sep 2011 04:33:08 +0000 (04:33 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 5 Sep 2011 04:33:08 +0000 (04:33 +0000)
commitbbab4abf33982e415a46fbc377c885606ce10dbe
treed41708befc760369af40f5ad47e802f104006409
parentf84c3f4aefffedace1c67229cbfefc18d8adb9ba
PR c++/50248
Core 1358
* init.c (perform_member_init): Don't diagnose missing inits here.
(emit_mem_initializers): Or here.
* method.c (process_subob_fn): Don't instantiate constexpr ctors.
* semantics.c (cx_check_missing_mem_inits): New.
(explain_invalid_constexpr_fn): Call it.
(register_constexpr_fundef): Likewise.  Leave
DECL_DECLARED_CONSTEXPR_P set when the body is unsuitable.
(cxx_eval_call_expression): Adjust diagnostics.
(cxx_eval_constant_expression): Catch use of 'this' in a constructor.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178518 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/init.c
gcc/cp/method.c
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/constexpr-48089.C
gcc/testsuite/g++.dg/cpp0x/constexpr-ex1.C
gcc/testsuite/g++.dg/cpp0x/constexpr-template1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/constexpr-template2.C [new file with mode: 0644]