diff options
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. */; |