[cfe-commits] [Patch] Remove checking signs of operands of conditional operator from -Wsign-compare

David Blaikie dblaikie at gmail.com
Thu Jul 14 15:59:43 PDT 2011


> Currently, -Wsign-compare will warn if conditional operands differ in
> signedness. This patch will move this warning to -Wmixed-sign-conditional
>

What exactly are the semantics of mismatched sign types in a conditional
expression? Is one of the arguments silently forced into (signed or
unsigned) of the same size? Would it be possible to catch that coercion as a
general case, rather than looking at the conditional operator specifically?

[I suppose the -Wsign-conversion warning that Chandler mentioned would be
the user facing equivalent of this. Then my question becomes: Can that
warning be implemented in a general way such that there's no need to do
specific work for the conditional operator case]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110714/b45d3c4b/attachment.html>


More information about the cfe-commits mailing list