History

fix sizeof(array + integer)

Previously sizeof would return the size of the array although the expression is always a plain pointer of 4 (or 8) bytes.

Daniel Glöckner committed 17 years ago

Commit bc48cc11 parent 5b113f31 file · +1 −0Browse files

Unified · Split

tccgen.c+1−0
@@ -1306,6 +1306,7 @@ void gen_op(int op) · 1305 unmodified lines
1306 swap(&t1, &t2);1306 swap(&t1, &t2);
1307 }1307 }
1308 type1 = vtop[-1].type;1308 type1 = vtop[-1].type;
1309 type1.t &= ~VT_ARRAY;
1309#ifdef TCC_TARGET_X86_641310#ifdef TCC_TARGET_X86_64
1310 vpushll(pointed_size(&vtop[-1].type));1311 vpushll(pointed_size(&vtop[-1].type));
1311#else1312#else

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