init.c (build_aggr_init): Fix accidental use of C99 construct in previous change.
* init.c (build_aggr_init): Fix accidental use of C99 construct in previous change. From-SVN: r81067
This commit is contained in:
parent
08a21bfd0a
commit
671cb99343
|
@ -1,5 +1,8 @@
|
|||
2004-04-22 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* init.c (build_aggr_init): Fix accidental use of C99 construct in
|
||||
previous change.
|
||||
|
||||
* class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
|
||||
braced initializer.
|
||||
* cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
|
||||
|
@ -8,6 +11,7 @@
|
|||
(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.
|
||||
|
|
|
@ -1090,6 +1090,8 @@ build_aggr_init (tree exp, tree init, int flags)
|
|||
|
||||
if (TREE_CODE (type) == ARRAY_TYPE)
|
||||
{
|
||||
tree itype;
|
||||
|
||||
/* An array may not be initialized use the parenthesized
|
||||
initialization form -- unless the initializer is "()". */
|
||||
if (init && TREE_CODE (init) == TREE_LIST)
|
||||
|
@ -1099,7 +1101,7 @@ build_aggr_init (tree exp, tree init, int flags)
|
|||
}
|
||||
/* Must arrange to initialize each element of EXP
|
||||
from elements of INIT. */
|
||||
tree itype = init ? TREE_TYPE (init) : NULL_TREE;
|
||||
itype = init ? TREE_TYPE (init) : NULL_TREE;
|
||||
if (cp_type_quals (type) != TYPE_UNQUALIFIED)
|
||||
TREE_TYPE (exp) = TYPE_MAIN_VARIANT (type);
|
||||
if (itype && cp_type_quals (itype) != TYPE_UNQUALIFIED)
|
||||
|
|
Loading…
Reference in New Issue