delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/06/06:14:50

Date: Thu, 6 Mar 1997 13:10:20 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "Salvador Eduardo Tropea (SET)" <salvador AT natacha DOT inti DOT edu DOT ar>
cc: "A.Appleyard" <A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk>, djgpp AT delorie DOT com
Subject: Re: False alarm of variable used uninitialized
In-Reply-To: <m0w2F6z-000S1oC@natacha.inti.edu.ar>
Message-ID: <Pine.SUN.3.91.970306130954.20341E-100000@is>
MIME-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019