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/parser.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/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index fde2f5a..0732a65 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -11541,10 +11541,6 @@ cp_parser_initializer_clause (cp_parser* parser, bool* non_constant_p) cp_lexer_consume_token (parser->lexer); /* Create a CONSTRUCTOR to represent the braced-initializer. */ initializer = make_node (CONSTRUCTOR); - /* Mark it with TREE_HAS_CONSTRUCTOR. This should not be - necessary, but check_initializer depends upon it, for - now. */ - TREE_HAS_CONSTRUCTOR (initializer) = 1; /* If it's not a `}', then there is a non-trivial initializer. */ if (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_BRACE)) { |