diff options
author | Richard Stallman <rms@gnu.org> | 1993-10-20 03:29:25 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1993-10-20 03:29:25 +0000 |
commit | 4d65300e6b4b414751fa23ccc58cee2d6e39ae99 (patch) | |
tree | ef53f803314bee1a27dc8003aedc0f174795fe88 /gcc | |
parent | 02ccd5118e8920b9e17f6b78ce3afc3a6cc582d3 (diff) | |
download | gcc-4d65300e6b4b414751fa23ccc58cee2d6e39ae99.zip gcc-4d65300e6b4b414751fa23ccc58cee2d6e39ae99.tar.gz gcc-4d65300e6b4b414751fa23ccc58cee2d6e39ae99.tar.bz2 |
(digest_init): For arrays, use comptypes to compare
types instead of comparing pointers.
From-SVN: r5818
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/c-typeck.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index cea82f3..54cb60c 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -4463,7 +4463,8 @@ digest_init (type, init, require_constant, constructor_constant) || typ1 == signed_wchar_type_node) && ((inside_init && TREE_CODE (inside_init) == STRING_CST))) { - if (TREE_TYPE (inside_init) == type) + if (comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (inside_init)), + TYPE_MAIN_VARIANT (type))) return inside_init; if ((TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (inside_init))) |