On Sat, May 12, 2007 at 08:31:36PM +0200, Philippe Ribet wrote:
> I just succeed in isolating a tcc bug from a very large piece of software:
[...]
> printf("%d\n",INT64_C(0)>=(INT64_C(-2147483648)));
Invokes undefined behavior. According to 7.18.4p2, the argument to
INT64_C() must be an integer constant. Despite appearances,
-2147483648 is not an integer constant. C does not have negative
integer constants.
What -2147483648 _is_, is an integer constant expression applying the
unary negation operator to the integer constant 2147483648. If you're
trying to do this in real code, use something like this instead:
-INT64_C(2147483648)
-Dave Dodge
_______________________________________________
Tinycc-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/tinycc-devel