diff options
author | kan <kan@FreeBSD.org> | 2007-08-14 02:45:23 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2007-08-14 02:45:23 +0000 |
commit | d2ff90cc580c62afb8528917c1c80ac49d9aaa01 (patch) | |
tree | 7b2fa7d3de8706d9ca72fdb284ce2a57f67d460a /contrib/gcc/cp/init.c | |
parent | 8a2681fa7ee14c49235e12318f7de5a9a7f492ea (diff) | |
download | FreeBSD-src-d2ff90cc580c62afb8528917c1c80ac49d9aaa01.zip FreeBSD-src-d2ff90cc580c62afb8528917c1c80ac49d9aaa01.tar.gz |
GCC 4.2.1 release.
Diffstat (limited to 'contrib/gcc/cp/init.c')
-rw-r--r-- | contrib/gcc/cp/init.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/contrib/gcc/cp/init.c b/contrib/gcc/cp/init.c index 0ea6888..70bc764 100644 --- a/contrib/gcc/cp/init.c +++ b/contrib/gcc/cp/init.c @@ -178,8 +178,7 @@ build_zero_init (tree type, tree nelts, bool static_storage_p) items with static storage duration that are not otherwise initialized are initialized to zero. */ ; - else if (SCALAR_TYPE_P (type) - || TREE_CODE (type) == COMPLEX_TYPE) + else if (SCALAR_TYPE_P (type)) init = convert (type, integer_zero_node); else if (CLASS_TYPE_P (type)) { @@ -196,7 +195,7 @@ build_zero_init (tree type, tree nelts, bool static_storage_p) corresponding to base classes as well. Thus, iterating over TYPE_FIELDs will result in correct initialization of all of the subobjects. */ - if (static_storage_p && !zero_init_p (TREE_TYPE (field))) + if (!static_storage_p || !zero_init_p (TREE_TYPE (field))) { tree value = build_zero_init (TREE_TYPE (field), /*nelts=*/NULL_TREE, @@ -1970,8 +1969,7 @@ build_new_1 (tree placement, tree type, tree nelts, tree init, globally_qualified_p, (placement_allocation_fn_p ? alloc_call : NULL_TREE), - (placement_allocation_fn_p - ? alloc_fn : NULL_TREE)); + alloc_fn); if (!cleanup) /* We're done. */; |