This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC Status Report (2004-03-09)
> So, would you please apply Olivier's patch to the 3.4 branch and the
> mainline? Then, we need to come up with some better long-term solution.
There is a hitch: the C front-end is relying on the clearing optimization to
implement the semantics mandated by C99 §6.7.8 [19], that is for
struct B {
struct A a;
void * const b;
struct A const * const c;
struct A const *d;
};
bar (void *x)
{
struct B y = { .b = x, .c = (void *) 0 };
}
the front-end sends a constructor with only 2 elements to the middle-end,
while C99 wants b.a and b.d to be cleared too.
Amazingly, the patch causes no failure in the whole testsuite except for the
PR's testcase (gcc.dg/20031202-1.c), which now fails everywhere.
Hum... what to do here? Other front-ends may also be relying on this
semantics (the middle-end clears every record or union whose constructor is
not complete). Maybe we could simply revert to the state of the 3.3 branch.
--
Eric Botcazou