<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi,<br>
<br>
Am I right in thinking that char types are not checked for tautological-compare?<br>
<br>
I started to look at SemaChecking.cpp CheckTrivialUnsignedComparison()<br>
Is this the right place?<br>
<br>
example code:<br>
void test(void) {<br>
unsigned char c = (unsigned char)-1;<br>
if(c >= 0) test();<br>
unsigned int i = (unsigned int)-1;<br>
if(i >= 0) test();<br>
}<br>
gives the warning:<br>
char_signedness.c:6:8: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]<br>
if(i >= 0) test();<br>
~ ^ ~<br>
1 warning generated.<br>
<br>
<br>
I'm happy to do the work, but would welcome some input!<br>
<br>
robert<br>
<br>
</div>
</body>
</html>