---
tccgen.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tccgen.c b/tccgen.c
index 10ddb617..dd8e9cd9 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -3097,6 +3097,11 @@ op_err:
#endif
type1 = vtop[-1].type;
vpush_type_size(pointed_type(&vtop[-1].type), &align);
+
+ if (!(vtop[-1].type.t & VT_UNSIGNED)) {
+ gen_cast_s(VT_PTRDIFF_T);
+ }
+
gen_op('*');
#ifdef CONFIG_TCC_BCHECK
if (tcc_state->do_bounds_check && !CONST_WANTED) {
--
2.51.2
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel