* [C PATCH] Use AGGREGATE_TYPE_P
@ 2015-05-19 19:35 Marek Polacek
0 siblings, 0 replies; only message in thread
From: Marek Polacek @ 2015-05-19 19:35 UTC (permalink / raw)
To: GCC Patches
Bootstrapped/regtested on x86_64-linux, applying to trunk.
2015-05-19 Marek Polacek <polacek@redhat.com>
* c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
diff --git gcc/c/c-typeck.c gcc/c/c-typeck.c
index 7f54490..cf5322f 100644
--- gcc/c/c-typeck.c
+++ gcc/c/c-typeck.c
@@ -7126,10 +7126,7 @@ start_init (tree decl, tree asmspec_tree ATTRIBUTE_UNUSED, int top_level)
= ((TREE_STATIC (decl) || (pedantic && !flag_isoc99))
/* For a scalar, you can always use any value to initialize,
even within braces. */
- && (TREE_CODE (TREE_TYPE (decl)) == ARRAY_TYPE
- || TREE_CODE (TREE_TYPE (decl)) == RECORD_TYPE
- || TREE_CODE (TREE_TYPE (decl)) == UNION_TYPE
- || TREE_CODE (TREE_TYPE (decl)) == QUAL_UNION_TYPE));
+ && AGGREGATE_TYPE_P (TREE_TYPE (decl)));
locus = identifier_to_locale (IDENTIFIER_POINTER (DECL_NAME (decl)));
}
else
Marek
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-05-19 19:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-19 19:35 [C PATCH] Use AGGREGATE_TYPE_P Marek Polacek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).