From 5522c047d527fec1955c75f05ce2d43464a62ce3 Mon Sep 17 00:00:00 2001 From: Per Bothner Date: Tue, 14 Sep 1993 16:23:18 -0700 Subject: [PATCH] (digest_init): Compare types using comptypes. From-SVN: r5321 --- gcc/c-typeck.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 89767c3f4bd..7862221b0d0 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 -- 2.30.2