diff options
Diffstat (limited to 'gcc/cp/typeck2.c')
-rw-r--r-- | gcc/cp/typeck2.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index 42520e2f767..a37a3d6f43e 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -712,8 +712,7 @@ digest_init (tree type, tree init) return process_init_constructor (type, init); else { - if (TREE_HAS_CONSTRUCTOR (init) - && TREE_CODE (type) == ARRAY_TYPE) + if (COMPOUND_LITERAL_P (init) && TREE_CODE (type) == ARRAY_TYPE) { error ("cannot initialize aggregate of type %qT with " "a compound literal", type); |