[PATCH] Fix PR c++/42556
Eric Botcazou
ebotcazou@adacore.com
Tue Mar 23 09:16:00 GMT 2010
> The cause of this PR is that the C++ front end splits the nonconstant
> part initialization of
>
> int v[4] = {a, b, c, d};
>
> into separate statements. In this test case, all the elements in the
> initializers are noncontant. After nonconstant splitting, an empty
> CONSTRUCTOR tree is left. The C++ front end does not remove it although
> it can. But in GCC an empty CONSTRUCTOR means zero out the whole
> structure. And the later passes of GCC failed to remove the useless
> zeroing.
Why not just remove the empty CONSTRUCTOR if it is useless?
--
Eric Botcazou
More information about the Gcc-patches
mailing list