diff options
Diffstat (limited to 'gcc/cp/typeck2.c')
-rw-r--r-- | gcc/cp/typeck2.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index 07881387eba..79aa354ad02 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -450,6 +450,12 @@ cxx_incomplete_type_diagnostic (const_tree value, const_tree type, break; case LANG_TYPE: + if (type == init_list_type_node) + { + emit_diagnostic (diag_kind, input_location, 0, + "invalid use of brace-enclosed initializer list"); + break; + } gcc_assert (type == unknown_type_node); if (value && TREE_CODE (value) == COMPONENT_REF) goto bad_member; |