History

x86-64: Fix Wrong comparisonbetweenpointerandlongcste

main (int argc, char *argv[]) { char *p = (char *)0x12345678ABCD000F; int res; res = (p != (char *)0x12345678ABCD000F); return res; }

Christian Jullien committed 16 years ago

Commit 614790d1 parent e500c911 file · +4 −0Browse files

Unified · Split

tccgen.c+4−0
@@ -1543,6 +1543,10 @@ static void gen_cast(CType *type) · 1542 unmodified lines
1543 vtop->c.ll = vtop->c.ull;1543 vtop->c.ll = vtop->c.ull;
1544 else if (sbt & VT_UNSIGNED)1544 else if (sbt & VT_UNSIGNED)
1545 vtop->c.ll = vtop->c.ui;1545 vtop->c.ll = vtop->c.ui;
1546#ifdef TCC_TARGET_X86_64
1547 else if (sbt == VT_PTR)
1548 ;
1549#endif
1546 else if (sbt != VT_LLONG)1550 else if (sbt != VT_LLONG)
1547 vtop->c.ll = vtop->c.i;1551 vtop->c.ll = vtop->c.i;
1548 1552

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t