Commit 9bbecbc4 by J"orn Rennecke Committed by Joern Rennecke

c-typeck.c (output_init_element, [...]): When advancing…

c-typeck.c (output_init_element, [...]): When advancing constructor_unfilled_fields for a RECORD_TYPE...

	* c-typeck.c (output_init_element, process_init_element):
	When advancing constructor_unfilled_fields for a RECORD_TYPE,
	check for nameless bit fields.

From-SVN: r28098
parent 5937a6f9
Wed Jul 14 23:45:48 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
* c-typeck.c (output_init_element, process_init_element):
When advancing constructor_unfilled_fields for a RECORD_TYPE,
check for nameless bit fields.
Wed Jul 14 01:57:39 1999 Richard Henderson <rth@cygnus.com> Wed Jul 14 01:57:39 1999 Richard Henderson <rth@cygnus.com>
* regclass.c (scan_one_insn): Notice subregs that change the * regclass.c (scan_one_insn): Notice subregs that change the
......
...@@ -6150,7 +6150,16 @@ output_init_element (value, type, field, pending) ...@@ -6150,7 +6150,16 @@ output_init_element (value, type, field, pending)
= TREE_INT_CST_HIGH (tem); = TREE_INT_CST_HIGH (tem);
} }
else if (TREE_CODE (constructor_type) == RECORD_TYPE) else if (TREE_CODE (constructor_type) == RECORD_TYPE)
constructor_unfilled_fields = TREE_CHAIN (constructor_unfilled_fields); {
constructor_unfilled_fields =
TREE_CHAIN (constructor_unfilled_fields);
/* Skip any nameless bit fields. */
while (constructor_unfilled_fields != 0
&& DECL_C_BIT_FIELD (constructor_unfilled_fields)
&& DECL_NAME (constructor_unfilled_fields) == 0)
constructor_unfilled_fields =
TREE_CHAIN (constructor_unfilled_fields);
}
else if (TREE_CODE (constructor_type) == UNION_TYPE) else if (TREE_CODE (constructor_type) == UNION_TYPE)
constructor_unfilled_fields = 0; constructor_unfilled_fields = 0;
...@@ -6485,6 +6494,12 @@ process_init_element (value) ...@@ -6485,6 +6494,12 @@ process_init_element (value)
= TREE_INT_CST_HIGH (temp); = TREE_INT_CST_HIGH (temp);
constructor_unfilled_fields = TREE_CHAIN (constructor_fields); constructor_unfilled_fields = TREE_CHAIN (constructor_fields);
/* Skip any nameless bit fields. */
while (constructor_unfilled_fields != 0
&& DECL_C_BIT_FIELD (constructor_unfilled_fields)
&& DECL_NAME (constructor_unfilled_fields) == 0)
constructor_unfilled_fields =
TREE_CHAIN (constructor_unfilled_fields);
} }
constructor_fields = TREE_CHAIN (constructor_fields); constructor_fields = TREE_CHAIN (constructor_fields);
......
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