------- Comment #12 from dcb314 at hotmail dot com  2009-01-30 13:48 -------
(In reply to comment #1)
> Yes this would be slightly useful but one has to be care full of what is 
> warned about.

Agreed. For a first cut, a simple straight forward job, without
considering the complex cases, could be the way forward.

For example, all bets would be off for any variable that
has it's address taken.

To get some data on how many times this "set but not used" problem
occurs in real code, I just had a go at compiling almost half the Suse Linux 
distribution source tree with Intel C/C++.

For source codes [a-k]*, there where 906 occurrences of the "set but
not used" warning from Intel C/C++. 

Given that Intel can't compile a lot of the GNU specific code,  
I estimate at least 2,000 and maybe 2,500 occurrences of this
problem in Suse Linux distribution.

Other distributions are different sizes, but at least this
gives us a single data point on how frequently the "set but not
used" problem occurs in practice.


-- 


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

Reply via email to