On Jan 31, 2011, at 8:39 AM, Ted Kremenek wrote:

> 
> I'll be honest that I'm concerned that we can make -Wuninitialized work in 
> Clang with the same expectations that people have with GCC's implementation. 
> Since GCC's implementation depends on its backend optimizer, it gets a whole 
> bunch of "smarts" for free when it comes to control-dependencies (although I 
> suspect in many cases GCC just gives up, and conservatively not warn).  The 
> static analyzer can easily reason about control-dependencies, but that 
> inherently makes the dataflow analysis much more expensive (and non-linear).  
> Replicating some subset of that functionality in -Wuninitialized is not going 
> to be cheap.

There is also a serious cost to GCC's warning: it is unstable across versions 
of the compiler.  I think it is better for -Wuninitialized to be simple (fast), 
predictable, and stable across the compiler versions.  If you want a theorem 
prover, look to the static analyzer :)

-Chris
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to