]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR c++/50248 ([C++0x] unnecessary instantiation of constexpr constructor)
authorJason Merrill <jason@redhat.com>
Mon, 5 Sep 2011 04:33:08 +0000 (00:33 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 5 Sep 2011 04:33:08 +0000 (00:33 -0400)
commitaee8801251cc3fd10dc12e4fc48a0d0bc5f37019
treed41708befc760369af40f5ad47e802f104006409
parente818d3ff6869ccfe551e999cbe270266ff1c33ec
re PR c++/50248 ([C++0x] unnecessary instantiation of constexpr constructor)

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.

From-SVN: r178518
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]