[cfe-dev] new -Wuninitialized implementation in Clang
Chris Lattner
clattner at apple.com
Sun Feb 6 06:59:00 PST 2011
On Feb 6, 2011, at 6:46 AM, Alexei Svitkine wrote:
>> Another refinement of this, it would be really nice to add an attribute((silence_uninitialized)) attribute, which would allow turning the warning off for a particular variable. This could be used by proponents of "I know my code is safe and I don't want to initialize the variable". It is good IMO to have an attribute here, because then that desire is explicit in the code. This should be mentioned in the compatibility.html file.
> IMHO, a warning that has a lot of false positives should not be on by
> default.
I agree. However, a dozen false positives on hundreds of thousands of lines of code is not a lot of false positives.
-Chris
More information about the cfe-dev
mailing list