[LLVMdev] Build Failure
dag at cray.com
dag at cray.com
Thu Jan 3 10:59:30 PST 2013
David Blaikie <dblaikie at gmail.com> writes:
>> That is not always true in the cases I've found. That's the consequence
>> of ignoring warnings.
>
> Except it isn't. We can ignore this warning & instead use
> Valgrind-esque tools to catch not only these bugs, but catch & fix
> them better by learning which specific codepath leads to the
> uninitialized use, rather than just initializing a variable to zero
> (or whatever) even in cases where that value was never intended to be
> used in any computation.
Another option is to use compiler pragmas to disable warnings when we
know they are false positives. Would that be acceptable to add to
llvm/clang? That seems the best of all worlds. The pragma serves to
document a special case we think is ok while still allowing valgrind to
catch bugs.
I can easily rework my patches to use pragmas.
-David
More information about the llvm-dev
mailing list