re PR c++/42844 (const variable requires initializer / no explicitly declared default...
commit6ad86a5b264dcf68f9eee93da90af06d15d91e4a
authorFabien ChĂȘne <fabien.chene@gmail.com>
Tue, 27 Apr 2010 18:56:13 +0000 (27 18:56 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 27 Apr 2010 18:56:13 +0000 (27 14:56 -0400)
treec95fa21322f4c7608254fa16bb33ea36db219406
parent78b41ae280b857079da43d91e81356c7afad8512
re PR c++/42844 (const variable requires initializer / no explicitly declared default constructor)

PR c++/42844
* decl.c (check_for_uninitialized_const_var): Handle classes that need
constructing, too.
(check_initializer): Call it for classes that need constructing, too.
* class.c (in_class_defaulted_default_constructor): New.
* cp-tree.h: Declare it.

Co-Authored-By: Jason Merrill <jason@redhat.com>
From-SVN: r158797
14 files changed:
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/defaulted2.C
gcc/testsuite/g++.dg/cpp0x/pr42844-2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/init/pr42844.C [new file with mode: 0644]
gcc/testsuite/g++.dg/tree-ssa/pr27549.C
gcc/testsuite/g++.old-deja/g++.mike/dyncast8.C
libstdc++-v3/ChangeLog
libstdc++-v3/src/future.cc
libstdc++-v3/src/system_error.cc
libstdc++-v3/testsuite/util/testsuite_error.h