Previously sizeof would return the size of the array although the expression is always a plain pointer of 4 (or 8) bytes.
Unified · Split
| @@ -1306,6 +1306,7 @@ void gen_op(int op) · 1305 unmodified lines | ||
| 1306 | 1306 | swap(&t1, &t2); |
| 1307 | 1307 | } |
| 1308 | 1308 | type1 = vtop[-1].type; |
| 1309 | + type1.t &= ~VT_ARRAY; | |
| 1309 | 1310 | #ifdef TCC_TARGET_X86_64 |
| 1310 | 1311 | vpushll(pointed_size(&vtop[-1].type)); |
| 1311 | 1312 | #else |