diff options
Diffstat (limited to 'gcc/cp/decl.cc')
-rw-r--r-- | gcc/cp/decl.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/cp/decl.cc b/gcc/cp/decl.cc index 71e4c2b..e8622e2 100644 --- a/gcc/cp/decl.cc +++ b/gcc/cp/decl.cc @@ -14582,10 +14582,9 @@ grokdeclarator (const cp_declarator *declarator, if (ctype && (TREE_CODE (ctype) == UNION_TYPE || TREE_CODE (ctype) == QUAL_UNION_TYPE)) - { - error_at (id_loc, "flexible array member in union"); - type = error_mark_node; - } + pedwarn (id_loc, OPT_Wpedantic, + "flexible array member in union is a GCC extension"); + else { /* Array is a flexible member. */ |