aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZack Weinberg <zack@codesourcery.com>2003-04-13 03:31:09 +0000
committerZack Weinberg <zack@gcc.gnu.org>2003-04-13 03:31:09 +0000
commit6d0c8bb1bc7a4f41ed1b6d57c9ff16f6a84fee69 (patch)
tree775d09bdac212ae451341d55fff8c92a52425f51
parentdcf92453c80642d3b98252f21a64ce8277cca8c5 (diff)
downloadgcc-6d0c8bb1bc7a4f41ed1b6d57c9ff16f6a84fee69.zip
gcc-6d0c8bb1bc7a4f41ed1b6d57c9ff16f6a84fee69.tar.gz
gcc-6d0c8bb1bc7a4f41ed1b6d57c9ff16f6a84fee69.tar.bz2
* c-typeck.c (digest_init, push_init_level): Use CONSTRUCTOR_ELTS.
From-SVN: r65540
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/c-typeck.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9ae6cf1..9a93abb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
2003-04-12 Zack Weinberg <zack@codesourcery.com>
+ * c-typeck.c (digest_init, push_init_level): Use CONSTRUCTOR_ELTS.
+
+2003-04-12 Zack Weinberg <zack@codesourcery.com>
+
* tree.c (build_constructor): New function.
* tree.h: Prototype it.
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index aa58bea..4c14b5f9 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -4759,7 +4759,7 @@ digest_init (type, init, require_constant)
if (code == VECTOR_TYPE
&& comptypes (TREE_TYPE (inside_init), type)
&& TREE_CONSTANT (inside_init))
- return build_vector (type, TREE_OPERAND (inside_init, 1));
+ return build_vector (type, CONSTRUCTOR_ELTS (inside_init));
/* Any type can be initialized
from an expression of the same type, optionally with braces. */
@@ -5377,7 +5377,7 @@ push_init_level (implicit)
{
constructor_constant = TREE_CONSTANT (value);
constructor_simple = TREE_STATIC (value);
- constructor_elements = TREE_OPERAND (value, 1);
+ constructor_elements = CONSTRUCTOR_ELTS (value);
if (constructor_elements
&& (TREE_CODE (constructor_type) == RECORD_TYPE
|| TREE_CODE (constructor_type) == ARRAY_TYPE))