aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/init.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2004-04-23 01:06:54 +0000
committerMark Mitchell <mark@codesourcery.com>2004-04-23 01:06:54 +0000
commit753dad081f37619cc3ca9912ca8dfd7be0506ab1 (patch)
treef887ec91f724eba796a864326763be5884693725 /gcc/cp/init.c
parentfe3b8245f71eb1a3ece8931dfc160d767c5ccf49 (diff)
* init.c (build_aggr_init): Fix accidental use of C99 construct in
previous change. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@81067 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r--gcc/cp/init.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 58d9f6db97f..6811aaab58e 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -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)