mirror of
https://github.com/mirror/tinycc.git
synced 2024-12-26 03:50:07 +08:00
suppress code after continue as well
fix an oversight in code suppression
This commit is contained in:
parent
d27ea5155f
commit
5c862a08b4
2
tccgen.c
2
tccgen.c
@ -6275,6 +6275,7 @@ static void block(int *bsym, int *csym, int is_expr)
|
||||
*csym = gjmp(*csym);
|
||||
next();
|
||||
skip(';');
|
||||
nocode_wanted |= 0x20000000;
|
||||
} else if (tok == TOK_FOR) {
|
||||
int e;
|
||||
int saved_nocode_wanted;
|
||||
@ -7670,7 +7671,6 @@ found:
|
||||
}
|
||||
next();
|
||||
}
|
||||
ad.a.aligned = 0;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
@ -1374,6 +1374,12 @@ void optimize_out(void)
|
||||
printf("ool6:%d\n", defined_function());
|
||||
goto breakhere;
|
||||
}
|
||||
j = 1;
|
||||
while (j) {
|
||||
j--;
|
||||
continue;
|
||||
printf("ool7:%d\n", undefined_function());
|
||||
}
|
||||
|
||||
/* Test that constants in logical && are optimized: */
|
||||
i = 0 && undefined_function();
|
||||
|
Loading…
Reference in New Issue
Block a user