[PATCH] Fix PR c++/42556
Jie Zhang
jie@codesourcery.com
Tue Mar 23 11:12:00 GMT 2010
On 03/23/2010 06:08 PM, Eric Botcazou wrote:
>> Yes. My patch is to make sure that empty CONSTRUCTOR is removed when it
>> can be removed, i.e. all its elements have been initialized.
>
> I meant, removed in the C++ front-end.
>
We can add code to remove the empty CONSTRUCTOR in the C++ front-end.
But it's only useful when all initializers are non-constrant and split
out. When there are constant initializers, they will be left in the
CONSTRUCTOR and result an non-empty CONSTRUCTOR. The gimplifier handles
with such CONSTRUCTOR and removes it if it becomes empty. So we don't
need to duplicate the code to remove the empty CONSTRUCTOR in the C++
front-end.
--
Jie Zhang
CodeSourcery
(650) 331-3385 x735
More information about the Gcc-patches
mailing list