[Bug middle-end/19515] [4.0 Regression] Violation of C99 6.7.8 §21 for unions
ebotcazou at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Jan 20 09:16:00 GMT 2005
------- Additional Comments From ebotcazou at gcc dot gnu dot org 2005-01-20 09:15 -------
> From expr.c:count_type_elements:
>
> case UNION_TYPE:
> case QUAL_UNION_TYPE:
> {
> /* Ho hum. How in the world do we guess here? Clearly it isn't
> right to count the fields. Guess based on the number of words. */
> HOST_WIDE_INT n = int_size_in_bytes (type);
> if (n < 0)
> return -1;
> return n / UNITS_PER_WORD;
> }
>
> So we cannot use count_type_elements in gimplify_init_constructor.
Can't we compute the result for unions based on the type of the first member?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19515
More information about the Gcc-bugs
mailing list