Fix C compiler interpreting signing, bug773.

This commit is contained in:
Wilson Snyder
2014-05-24 08:00:01 -04:00
parent 91e706ec1f
commit f705f9b275
3 changed files with 16 additions and 5 deletions
+3 -2
View File
@@ -622,8 +622,9 @@ public:
// Only 32 bits - llx + long long here just to appease CPP format warning
if (num<10) puts(cvtToStr(num));
else ofp()->printf("0x%" VL_PRI64 "x", (vluint64_t)num);
//Unneeded-Causes %lx format warnings:
// if (!nodep->num().isSigned() && (num & (1UL<<31))) puts("U");
// If signed, we'll do our own functions
// But must be here, or <= comparisons etc may end up signed
puts("U");
}
}
void emitSetVarConstant(const string& assignString, AstConst* constp) {