Comments
Patch
===================================================================
@@ -5458,6 +5458,7 @@ grokdeclarator (const struct c_declarato
if (size && integer_zerop (size))
{
gcc_assert (itype);
+ type = build_distinct_type_copy (TYPE_MAIN_VARIANT (type));
TYPE_SIZE (type) = bitsize_zero_node;
TYPE_SIZE_UNIT (type) = size_zero_node;
SET_TYPE_STRUCTURAL_EQUALITY (type);
@@ -5466,6 +5467,7 @@ grokdeclarator (const struct c_declarato
{
gcc_assert (itype);
/* The type is complete. C99 6.7.5.2p4 */
+ type = build_distinct_type_copy (TYPE_MAIN_VARIANT (type));
TYPE_SIZE (type) = bitsize_zero_node;
TYPE_SIZE_UNIT (type) = size_zero_node;
SET_TYPE_STRUCTURAL_EQUALITY (type);