diff options
author | Per Bothner <bothner@gcc.gnu.org> | 1993-09-14 16:23:18 -0700 |
---|---|---|
committer | Per Bothner <bothner@gcc.gnu.org> | 1993-09-14 16:23:18 -0700 |
commit | 5522c047d527fec1955c75f05ce2d43464a62ce3 (patch) | |
tree | a1c8fb0a16ad763db8b5de9c7c8fb64ceed96c6b | |
parent | 7f2ab886272973c37d305161e89f9f4873cabb7d (diff) | |
download | gcc-5522c047d527fec1955c75f05ce2d43464a62ce3.zip gcc-5522c047d527fec1955c75f05ce2d43464a62ce3.tar.gz gcc-5522c047d527fec1955c75f05ce2d43464a62ce3.tar.bz2 |
(digest_init): Compare types using comptypes.
From-SVN: r5321
-rw-r--r-- | gcc/c-typeck.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 89767c3..7862221 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -4943,8 +4943,8 @@ digest_init (type, init, require_constant, constructor_constant) from an expression of the same type, optionally with braces. */ if (inside_init && TREE_TYPE (inside_init) != 0 - && ((TYPE_MAIN_VARIANT (TREE_TYPE (inside_init)) - == TYPE_MAIN_VARIANT (type)) + && (comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (inside_init)), + TYPE_MAIN_VARIANT (type)) || (code == ARRAY_TYPE && comptypes (TREE_TYPE (inside_init), type)) || (code == POINTER_TYPE |