]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/cp/tree.c
cp-tree.h (struct lang_type): Added non_zero_init.
authorAlexandre Oliva <aoliva@redhat.com>
Tue, 14 May 2002 17:20:47 +0000 (17:20 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Tue, 14 May 2002 17:20:47 +0000 (17:20 +0000)
commit94e6e4c4f3d7533ab1de7b709e3b3305d3d8e52d
tree8e6a21c939257492f2f1761473f122f6de4c33dd
parente5f5feea65f904d95c6f7aded34f8d2f447141e9
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: r53461
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