History

Cast parameter of '!' to _Bool

Daniel Glöckner committed 17 years ago

Commit 1b599ea1 parent 2d9b5e01 file · +5 −2Browse files

Unified · Split

tcc.c+5−2
@@ -7516,9 +7516,12 @@ static void unary(void) · 7515 unmodified lines
7516 case '!':7516 case '!':
7517 next();7517 next();
7518 unary();7518 unary();
7519 if ((vtop->r & (VT_VALMASK | VT_LVAL | VT_SYM)) == VT_CONST)7519 if ((vtop->r & (VT_VALMASK | VT_LVAL | VT_SYM)) == VT_CONST) {
7520 CType boolean;
7521 boolean.t = VT_BOOL;
7522 gen_cast(&boolean);
7520 vtop->c.i = !vtop->c.i;7523 vtop->c.i = !vtop->c.i;
7521 else if ((vtop->r & VT_VALMASK) == VT_CMP)7524 } else if ((vtop->r & VT_VALMASK) == VT_CMP)
7522 vtop->c.i = vtop->c.i ^ 1;7525 vtop->c.i = vtop->c.i ^ 1;
7523 else {7526 else {
7524 save_regs(1);7527 save_regs(1);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t