aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tccgen.c4
-rw-r--r--tests/tests2/27_sizeof.c2
-rw-r--r--tests/tests2/27_sizeof.expect1
3 files changed, 4 insertions, 3 deletions
diff --git a/tccgen.c b/tccgen.c
index 4e6a116..72e892c 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -3877,12 +3877,10 @@ ST_FUNC void unary(void)
vtop->c.i = !vtop->c.i;
} else if ((vtop->r & VT_VALMASK) == VT_CMP)
vtop->c.i ^= 1;
- else if (!nocode_wanted) {
+ else {
save_regs(1);
vseti(VT_JMP, gvtst(1, 0));
}
- else
- vtop--;
break;
case '~':
next();
diff --git a/tests/tests2/27_sizeof.c b/tests/tests2/27_sizeof.c
index d1694b6..5ae0ede 100644
--- a/tests/tests2/27_sizeof.c
+++ b/tests/tests2/27_sizeof.c
@@ -10,6 +10,8 @@ int main()
printf("%d\n", sizeof(b));
printf("%d\n", sizeof(c));
+ printf("%d\n", sizeof(!a));
+
return 0;
}
diff --git a/tests/tests2/27_sizeof.expect b/tests/tests2/27_sizeof.expect
index 7329e00..a47ea3a 100644
--- a/tests/tests2/27_sizeof.expect
+++ b/tests/tests2/27_sizeof.expect
@@ -1,3 +1,4 @@
1
4
8
+4