From: Per Bothner Date: Tue, 14 Sep 1993 23:23:18 +0000 (-0700) Subject: (digest_init): Compare types using comptypes. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5522c047d527fec1955c75f05ce2d43464a62ce3;p=gcc.git (digest_init): Compare types using comptypes. From-SVN: r5321 --- 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