diff options
author | Mark Mitchell <mark@codesourcery.com> | 2004-04-22 21:29:35 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2004-04-22 21:29:35 +0000 |
commit | 92a62aad855ff49dbd3c975aed87ed141ff447b4 (patch) | |
tree | 0ba13a72c0e5f3f23ed463ff62b80ef65ac60f72 /gcc/cp/rtti.c | |
parent | 838a4849fab52af1c5d54703b4591d403544dd7f (diff) | |
download | gcc-92a62aad855ff49dbd3c975aed87ed141ff447b4.zip gcc-92a62aad855ff49dbd3c975aed87ed141ff447b4.tar.gz gcc-92a62aad855ff49dbd3c975aed87ed141ff447b4.tar.bz2 |
class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on braced initializer.
* class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
braced initializer.
* cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
* decl.c (reshape_init): Use it.
* init.c (perform_member_init): Remove redundant condition.
(build_aggr_init): Adjust to handle brace-enclosed initializers
correctly.
(expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
* parser.c (cp_parser_initializer_clause): Do not set
TREE_HAS_CONSTRUCTOR on the initializer.
* rtti.c (tinfo_base_init): Likewise.
(generic_initializer): Likewise.
(ptr_initializer): Likewise.
(ptm_initializer): Likewise.
(class_initializer): Likewise.
(get_pseudo_ti_init): Likewise.
* typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
* g++.dg/ext/complit3.C: New test.
From-SVN: r81052
Diffstat (limited to 'gcc/cp/rtti.c')
-rw-r--r-- | gcc/cp/rtti.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c index e9c0616..337c6be 100644 --- a/gcc/cp/rtti.c +++ b/gcc/cp/rtti.c @@ -807,7 +807,7 @@ tinfo_base_init (tree desc, tree target) init = tree_cons (NULL_TREE, decay_conversion (name_decl), init); init = build_constructor (NULL_TREE, nreverse (init)); - TREE_HAS_CONSTRUCTOR (init) = TREE_CONSTANT (init) = TREE_STATIC (init) = 1; + TREE_CONSTANT (init) = TREE_STATIC (init) = 1; init = tree_cons (NULL_TREE, init, NULL_TREE); return init; @@ -823,7 +823,7 @@ generic_initializer (tree desc, tree target) tree init = tinfo_base_init (desc, target); init = build_constructor (NULL_TREE, init); - TREE_HAS_CONSTRUCTOR (init) = TREE_CONSTANT (init) = TREE_STATIC (init) = 1; + TREE_CONSTANT (init) = TREE_STATIC (init) = 1; return init; } @@ -850,7 +850,7 @@ ptr_initializer (tree desc, tree target, bool *non_public_ptr) init); init = build_constructor (NULL_TREE, nreverse (init)); - TREE_HAS_CONSTRUCTOR (init) = TREE_CONSTANT (init) = TREE_STATIC (init) = 1; + TREE_CONSTANT (init) = TREE_STATIC (init) = 1; return init; } @@ -887,7 +887,7 @@ ptm_initializer (tree desc, tree target, bool *non_public_ptr) init); init = build_constructor (NULL_TREE, nreverse (init)); - TREE_HAS_CONSTRUCTOR (init) = TREE_CONSTANT (init) = TREE_STATIC (init) = 1; + TREE_CONSTANT (init) = TREE_STATIC (init) = 1; return init; } @@ -955,7 +955,7 @@ class_initializer (tree desc, tree target, tree trail) TREE_CHAIN (init) = trail; init = build_constructor (NULL_TREE, init); - TREE_HAS_CONSTRUCTOR (init) = TREE_CONSTANT (init) = TREE_STATIC (init) = 1; + TREE_CONSTANT (init) = TREE_STATIC (init) = 1; return init; } @@ -1072,11 +1072,9 @@ get_pseudo_ti_init (tree type, tree var_desc, bool *non_public_p) base_init = tree_cons (NULL_TREE, offset, base_init); base_init = tree_cons (NULL_TREE, tinfo, base_init); base_init = build_constructor (NULL_TREE, base_init); - TREE_HAS_CONSTRUCTOR (base_init) = 1; base_inits = tree_cons (NULL_TREE, base_init, base_inits); } base_inits = build_constructor (NULL_TREE, base_inits); - TREE_HAS_CONSTRUCTOR (base_inits) = 1; base_inits = tree_cons (NULL_TREE, base_inits, NULL_TREE); /* Prepend the number of bases. */ base_inits = tree_cons (NULL_TREE, |