aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index a851c6d..85c4d6b 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -5021,7 +5021,10 @@ grokdeclarator (const struct c_declarator *declarator,
else if (TREE_CODE (type) != ERROR_MARK
&& !COMPLETE_OR_UNBOUND_ARRAY_TYPE_P (type))
{
- error ("field %qE has incomplete type", name);
+ if (name)
+ error ("field %qE has incomplete type", name);
+ else
+ error ("unnamed field has incomplete type");
type = error_mark_node;
}
type = c_build_qualified_type (type, type_quals);