Mail Archives: djgpp/1997/03/06/06:14:50
On Wed, 5 Mar 1997, Salvador Eduardo Tropea (SET) wrote:
> I saw other situations where a human can analyze that the variable will be
> initialized but GCC claims that not. Seems that this part of GCC is a little
> weak.
Improving this part would require gcc to make much deeper flow
analysis of your code than it currently does. Flow analysis is
notoriously hard task for a compiler (try writing a tool that does
that, or even just look at the sources of gcc or lint, and you will
see what I mean) and therefore makes compilation slower. People who
tell that gcc should get better in this context should remember this
next time they complain about gcc being slower than other compilers in
terms of compiled lines per second.
Btw, I think gcc is better, not worse, than other compilers when it
prints these warnings: other compilers just don't do this kind of
analysis and so don't even know that a potential problem exists,
whereas gcc gives a fair warning.
- Raw text -