OSDN Git Service

* NEWS: Document removal of "new X = ..." extension.
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 11 Oct 2002 16:50:44 +0000 (16:50 +0000)
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 11 Oct 2002 16:50:44 +0000 (16:50 +0000)
commit2437a99cadf9e376dfda7f890c2d691663f518da
tree9c2e122fd8114e13c9a7e7b1f586fcf1e369c77d
parentdab33443fa07b39a8cb681c55c082180fcc6832c
* NEWS: Document removal of "new X = ..." extension.
* class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
brace-enclosed initializers.
* cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
(initialize_local_var): Remove declaration.
(expand_static_init): Likewise.
* decl.c (next_initializable_field): New function.
(reshape_init): Likewise.
(check_initializer): Use them.  Build dynamic initializer for
aggregates here too.
(initialize_local_var): Simplify, and incorporate cleanup
insertion code as well.
(destroy_local_var): Remove.
(cp_finish_decl): Tidy.
(expand_static_init): Fold checks for whether or not a variable
needs initialization into this function.  Simplify.
* decl2.c (do_static_initialization): Simplify.
* init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
be done for us automatically.
(expand_default_init): Handle brace-enclosed initializers
correctly.
(expand_aggr_init_1): Remove RTL-generation code.
(build_vec_init): Remove "new X = ..." support.
* parse.y (new_initializer): Likewise.
* rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
brace-enclosed initializer.
(create_pseudo_type_info): Likewise.
* typeck2.c (store_init_value): Don't try to handle digest_init
being called more than once.
(digest_init): Tidy handling of brace-enclosed initializers.

* g++.dg/init/array1.C: Remove invalid braces.
* g++.dg/init/brace1.C: New test.
* g++.dg/init/copy2.C: Likewise.
* g++.dg/init/copy3.C: Likewise.
* g++.old-deja/g++.ext/arrnew.C: Change WARNING to ERROR.
* g++.old-deja/g++.mike/p9129.C: Add ERROR on invalid use of
braces.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58053 138bc75d-0d04-0410-961f-82ee72b054a4
17 files changed:
gcc/cp/ChangeLog
gcc/cp/NEWS
gcc/cp/class.c
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/init.c
gcc/cp/parse.y
gcc/cp/rtti.c
gcc/cp/typeck2.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/init/array1.C
gcc/testsuite/g++.dg/init/brace1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/init/copy2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/init/copy3.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.ext/arrnew.C
gcc/testsuite/g++.old-deja/g++.mike/p9129.C