From 296a8c2f54dd8bf2f84c687db8329f179774220e Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Tue, 19 May 2015 20:08:21 +0000 Subject: [PATCH] * c-typeck.c (start_init): Use AGGREGATE_TYPE_P. From-SVN: r223414 --- gcc/c/ChangeLog | 6 +++++- gcc/c/c-typeck.c | 5 +---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index 390400d7903..4521cd13218 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,7 @@ +2015-05-19 Marek Polacek + + * c-typeck.c (start_init): Use AGGREGATE_TYPE_P. + 2015-05-19 Jakub Jelinek PR middle-end/66199 @@ -10,7 +14,7 @@ 2015-05-19 Mikhail Maltsev * c-typeck.c (build_array_ref): Use std::swap instead of explicit - swaps + swaps. 2015-05-16 Manuel López-Ibáñez diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c index 7f544902bb1..cf5322f5f21 100644 --- a/gcc/c/c-typeck.c +++ b/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 -- 2.30.2