tree.h (categorize_ctor_elements): Remove comment.
authorRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 13 Jul 2011 11:16:36 +0000 (11:16 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 13 Jul 2011 11:16:36 +0000 (11:16 +0000)
commit953d0c90a2f0a98b6d860ecfbf1bc5672653a588
treeb416f9a74ed2aeda3b26a2a7af943a1535790bb3
parent9111c715537d8ea0829d6ab7511017ed8658f303
tree.h (categorize_ctor_elements): Remove comment.

gcc/
* tree.h (categorize_ctor_elements): Remove comment.  Fix long line.
(count_type_elements): Delete.
(complete_ctor_at_level_p): Declare.
* expr.c (flexible_array_member_p): New function, split out from...
(count_type_elements): ...here.  Make static.  Replace allow_flexarr
parameter with for_ctor_p.  When for_ctor_p is true, return the
number of elements that should appear in the top-level constructor,
otherwise return an estimate of the number of scalars.
(categorize_ctor_elements): Replace p_must_clear with p_complete.
(categorize_ctor_elements_1): Likewise.  Use complete_ctor_at_level_p.
(complete_ctor_at_level_p): New function, borrowing union logic
from old categorize_ctor_elements_1.
(mostly_zeros_p): Return true if the constructor is not complete.
(all_zeros_p): Update call to categorize_ctor_elements.
* gimplify.c (gimplify_init_constructor): Update call to
categorize_ctor_elements.  Don't call count_type_elements.
Unconditionally prevent clearing for variable-sized types,
otherwise rely on categorize_ctor_elements to detect
incomplete initializers.

gcc/cp/
* typeck2.c (split_nonconstant_init_1): Pass the initializer directly,
rather than a pointer to it.  Return true if the whole of the value
was initialized by the generated statements.  Use
complete_ctor_at_level_p instead of count_type_elements.

gcc/testsuite/
2011-07-12  Chung-Lin Tang  <cltang@codesourcery.com>

* gcc.target/arm/pr48183.c: New test.

From-SVN: r176228
gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/typeck2.c
gcc/expr.c
gcc/gimplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/pr48183.c [new file with mode: 0644]
gcc/tree.h