diff options
| author | Daniel Glöckner <daniel-gl@gmx.net> | 2008-11-20 11:37:46 +0100 |
|---|---|---|
| committer | grischka <grischka> | 2008-11-30 07:21:35 +0100 |
| commit | 1b599ea7f8614b19762816d35eef467b8c9bd178 (patch) | |
| tree | 1484a25fa9efa2482039f48f1ae15947a8869028 /tcc.c | |
| parent | 2d9b5e0bb8b865cae7a9c93d9643e77ffab9c4f1 (diff) | |
| download | tinycc-1b599ea7f8614b19762816d35eef467b8c9bd178.tar.gz tinycc-1b599ea7f8614b19762816d35eef467b8c9bd178.tar.bz2 | |
Cast parameter of '!' to _Bool
Diffstat (limited to 'tcc.c')
| -rw-r--r-- | tcc.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -7516,9 +7516,12 @@ static void unary(void) case '!': next(); unary(); - if ((vtop->r & (VT_VALMASK | VT_LVAL | VT_SYM)) == VT_CONST) + if ((vtop->r & (VT_VALMASK | VT_LVAL | VT_SYM)) == VT_CONST) { + CType boolean; + boolean.t = VT_BOOL; + gen_cast(&boolean); vtop->c.i = !vtop->c.i; - else if ((vtop->r & VT_VALMASK) == VT_CMP) + } else if ((vtop->r & VT_VALMASK) == VT_CMP) vtop->c.i = vtop->c.i ^ 1; else { save_regs(1); |
