]> git.ipfire.org Git - thirdparty/gcc.git/commit
cp-tree.h (struct lang_type): Added non_zero_init.
authorAlexandre Oliva <aoliva@redhat.com>
Thu, 16 May 2002 02:09:15 +0000 (02:09 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Thu, 16 May 2002 02:09:15 +0000 (02:09 +0000)
commitd13b848af667097d1f3bb2504898461dbf01953f
tree8984fa79fecfc225a7c2580bf37722ab302e4b77
parentdd2fe8c9a855a651d124dd950bfb6e1bcd2418c5
cp-tree.h (struct lang_type): Added non_zero_init.

* cp-tree.h (struct lang_type): Added non_zero_init.
(CLASS_NON_ZERO_INIT_P): New macro.
(zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
* class.c (check_field_decls): Test non_zero_init.
* cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
zero-to-NULL conversions.
* decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
type that needs zero-initialization without zeros.
(check_initializer_decl): Compute zero-initializer for types
that require a non-trivial one.
* init.c (build_forced_zero_init): New function.
(build_default_init): Use it.
* tree.c (zero_init_p): New function.
* typeck2.c (force_store_init_value): New function.
(process_init_constructor): Create non-trivial zero-initializers
for array members and class fields.

From-SVN: r53501
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/cp-tree.h
gcc/cp/cvt.c
gcc/cp/decl.c
gcc/cp/init.c
gcc/cp/tree.c
gcc/cp/typeck2.c