------- Comment #10 from mmitchel at gcc dot gnu dot org  2010-08-17 17:50 
-------
The problem with -Wuninitialized might be the same problem I've been
sermonizing about for years -- we're trying to issue sensible warnings from our
optimizers, which means that as the optimizers are perturbed, the set of
warnings will change in various ways.  But, there's no reason for
-Wuninitialized to warn about a use of an empty structure, so I don't see why
removing the stores is unreasonable.

I certainly think that the front-end could safely optimize away such stores,
and that it would be reasonably easy to do so in the trivial cases. 
(Obviously, the optimizers would be responsible for more complex cases where
things are not perhaps immediately obvious to the front-end.)  I don't think
there's any reason we don't do that in the front-end; it's just something we
haven't done.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45307

Reply via email to