summaryrefslogtreecommitdiff
path: root/gcc/cp/method.c
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-17 22:35:29 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-17 22:35:29 +0000
commite59b9381e3f295094fe173f3e59babee4cb77a68 (patch)
tree69dd14ebdbf552a0333a15bf8a7c239e37f2ec70 /gcc/cp/method.c
parent1d8baa0efe4be51729c604adf7be9c36e786edff (diff)
downloadgcc-e59b9381e3f295094fe173f3e59babee4cb77a68.tar.gz
PR c++/29039
* typeck2.c (build_functional_cast): Don't zero-initialize non-PODs; instead, call their constructors. * method.c (synthesize_method): Always build mem-initializers, if we're synthesizing the default constructor. PR c++/29039 * g++.dg/init/ctor8.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117834 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r--gcc/cp/method.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index e2106fff55c..ded0af04716 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -784,7 +784,7 @@ synthesize_method (tree fndecl)
tree arg_chain = FUNCTION_FIRST_USER_PARMTYPE (fndecl);
if (arg_chain != void_list_node)
do_build_copy_constructor (fndecl);
- else if (TYPE_NEEDS_CONSTRUCTING (current_class_type))
+ else
finish_mem_initializers (NULL_TREE);
}