This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/19515] [4.0 Regression] Violation of C99 6.7.8 §21
- From: "steven at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Jan 2005 09:11:01 -0000
- Subject: [Bug middle-end/19515] [4.0 Regression] Violation of C99 6.7.8 §21
- References: <20050118221058.19515.ebotcazou@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From steven at gcc dot gnu dot org 2005-01-20 09:10 -------
>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.
I think we should somehow compute the size of the CONSTRUCTOR and compare
it with int_size_in_bytes (TREE_TYPE (object))...?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19515