Board index » cppbuilder » W8012
Fraser Ross
![]() CBuilder Developer |
W80122008-01-31 12:40:25 AM cppbuilder84 int main(int argc, char* argv[]) { int a= 1; int const a2= 2; unsigned int b= 3; unsigned int const b2= 4; bool d= a < b; bool e= a < b2; bool f= a2 < b; bool g= a2 < b2; return 0; } I'm only seeing a warning for the first comparison so that means a constant parameter causes the warning to not be given. I'll make a QC report if its not already done. There is another bug I've seen: int A(int size){ if (size < (unsigned int)0) return 1; return 0; } If I pass -10 then the function should return 0. It appears that the arithmetic conversion rule "--Otherwise, if either operand is unsigned, the other shall be converted to unsigned." isn't being applied. It probably isn't applied with other operators either. Fraser. |