Bernhard R. Link wrote:
* Chris Lattner <[EMAIL PROTECTED]> [051102 19:28]:
Jeff Law wrote:
>> I prefer consistency in warnings, regardless of optimization level.
>I disagree and I think we have a significant contingency of
>users that would disagree
Jeff, I completely agree with you for some class of users (users being
developers who use GCC but don't hack on GCC itself).
OTOH, there is also a very large class of users (like myself) who have
to write code that works well across several different compilers.
Why do you have to do something about a warning that is a clear false
positive?
..
I'd much prefer a warning about a "may be used uninitialized"
on less clever compiler over the change to lose a "is used unitialized"
warning some future more clever compiler may find
You clearly fall into the "class of users" I mentioned above, that like
*potentially* more precise warnings at any cost.
To me, I would rather have that obvious false-positive case warned about.
It will certainly be warned about on other (non-GCC) compilers, so the
variable will have to be explicitly initialized in my code whether GCC
warns about it or not.
If you compile your code with *one specific version* of GCC and use no
other compilers, I agree that accurate data-flow-based warnings are quite
useful (particularly if/when all of the cases where data-flow-based
warnings generating *more* false positives are fixed).
All I'm saying is that I do not fall into that catagory, so I don't find
them useful. I also posit that I'm not the only one writing portable
code, and using GCC as a compiler to do so. Given this, I'm just saying
that having some way to get "front-end" style warnings would be useful. :)
-Chris
--
http://nondot.org/sabre/
http://llvm.org/