aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Jullien <none>2009-12-15 17:45:15 +0100
committergrischka <grischka>2009-12-19 22:16:16 +0100
commit614790dc14b4a1b2055d040d290abcb60e05ef59 (patch)
tree36936035ac9a0e22b44efff359244eb7ba04527a
parente500c9118a49a8ce0e9b8cee87bb1329adfe1af9 (diff)
downloadtinycc-614790dc14b4a1b2055d040d290abcb60e05ef59.tar.gz
tinycc-614790dc14b4a1b2055d040d290abcb60e05ef59.tar.bz2
x86-64: Fix Wrong comparisonbetweenpointerandlongcste
main (int argc, char *argv[]) { char *p = (char *)0x12345678ABCD000F; int res; res = (p != (char *)0x12345678ABCD000F); return res; }
-rw-r--r--tccgen.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tccgen.c b/tccgen.c
index 58d0d89..2a03fb6 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -1543,6 +1543,10 @@ static void gen_cast(CType *type)
vtop->c.ll = vtop->c.ull;
else if (sbt & VT_UNSIGNED)
vtop->c.ll = vtop->c.ui;
+#ifdef TCC_TARGET_X86_64
+ else if (sbt == VT_PTR)
+ ;
+#endif
else if (sbt != VT_LLONG)
vtop->c.ll = vtop->c.i;