aboutsummaryrefslogtreecommitdiff
path: root/tccgen.c
diff options
context:
space:
mode:
authorDaniel Glöckner <daniel-gl@gmx.net>2009-10-08 00:24:21 +0200
committergrischka <grischka>2009-11-13 18:05:15 +0100
commitbc48cc1edb402b90de01a061f404164bb32f133f (patch)
tree1e0ea2d59327a7b6659f63e6ef34d6d2822f9d52 /tccgen.c
parent5b113f3ee3bc0f3e476535f39d9c3b4562242976 (diff)
downloadtinycc-bc48cc1edb402b90de01a061f404164bb32f133f.tar.gz
tinycc-bc48cc1edb402b90de01a061f404164bb32f133f.tar.bz2
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.
Diffstat (limited to 'tccgen.c')
-rw-r--r--tccgen.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tccgen.c b/tccgen.c
index 0ced4b6..78a5161 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -1306,6 +1306,7 @@ void gen_op(int op)
swap(&t1, &t2);
}
type1 = vtop[-1].type;
+ type1.t &= ~VT_ARRAY;
#ifdef TCC_TARGET_X86_64
vpushll(pointed_size(&vtop[-1].type));
#else