This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [3.3] PR opt/12082
> On Sat, 2003-09-06 at 00:47, Jan Hubicka wrote:
> > Hi,
> > the attached patch avoids the warning in this particular case, but it
> > seems to me that there are quite a bit of other oppurtunities for such a
> > problem to show up. I hope that tree-ssa branch will have better answer
> > for implementing such a warning.
>
> This is again an instance of a general design bug: trying to use
> optimization passes to generate warnings.
>
> Some day, we will just move all this stuff into front ends where it
> belongs; putting it in the optimizers means that it will always be
> broken, and the set of warnings will always change from release to
> release.
I would really love to see this done in the frontends, but on the other
hand I don't think we want frontends to do some kind of CFG and dead
code analysis just for such a warning.
Moving things to tree-SSA makes it a bit cleaner but far from good
sollution, so I don't see much a good answer for the problem. Any idea
what other compilers do?
Honza