Commit 3c9d8baf by Richard Kenner

(check_init_type_bitfields): Check recursively inside arrays and

records.

From-SVN: r6301
parent 6f38f669
......@@ -5200,14 +5200,21 @@ check_init_type_bitfields (type)
tree tail;
for (tail = TYPE_FIELDS (type); tail;
tail = TREE_CHAIN (tail))
if (DECL_BIT_FIELD (tail)
/* This catches cases like `int foo : 8;'. */
|| DECL_MODE (tail) != TYPE_MODE (TREE_TYPE (tail)))
{
constructor_incremental = 0;
break;
}
{
if (DECL_BIT_FIELD (tail)
/* This catches cases like `int foo : 8;'. */
|| DECL_MODE (tail) != TYPE_MODE (TREE_TYPE (tail)))
{
constructor_incremental = 0;
break;
}
check_init_type_bitfields (TREE_TYPE (tail));
}
}
else if (TREE_CODE (type) == ARRAY_TYPE)
check_init_type_bitfields (TREE_TYPE (type));
}
/* At the end of an implicit or explicit brace level,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment