aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/cmd/cc/pp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/cmd/cc/pp.c b/sys/cmd/cc/pp.c
index 494f293..4d7c643 100644
--- a/sys/cmd/cc/pp.c
+++ b/sys/cmd/cc/pp.c
@@ -943,6 +943,7 @@ ppif(Lexer *lx, int f)
string s;
int c, l, b;
+Eval:
if (f == 0) {
b = evalmacro(lx, 1);
if (b) {
@@ -992,8 +993,10 @@ Skip:
if (!s)
continue;
- if (l == 0 && (strcmp(s, "elif") == 0))
- ppif(lx, 0);
+ if (l == 0 && (strcmp(s, "elif") == 0)) {
+ f = 0;
+ goto Eval;
+ }
if (strcmp(s, "endif") == 0) {
if (l) {