https://bugs.llvm.org/show_bug.cgi?id=35728
Andy Gibbs <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |WORKSFORME
--- Comment #4 from Andy Gibbs <[email protected]> ---
You are right. I just found this post:
https://www.embeddeduse.com/2013/08/25/casting-a-negative-float-to-an-unsigned-int
And its solution, -Wconversion, works. The shame was that we always compile
code with -Wall -Wextra -Werror but it seems -Wall -Wextra still misses this
particular issue.
I, like the authors of the post, found myself hunting the most obscure of
problems. In my case, the fact that at some point code evolution had led to
one part of code changing to float from unsigned without checking all the
places where the value was used, and yes, in one place deep in a corner it was
being implicitly converted to unsigned int and leaving a parameter passed to a
function in a state of flux. It was one of those times when pure luck found
the issue.
I know this is a little out of scope here, but what is the way to turn on ALL
warnings in clang? Or see which warnings are not trapped by -Wall or -Wextra.
Even -Wpedantic doesn't pick this up!
I will mark this issue as solved.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs