summaryrefslogtreecommitdiff
path: root/preproc.c
diff options
context:
space:
mode:
Diffstat (limited to 'preproc.c')
-rw-r--r--preproc.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/preproc.c b/preproc.c
index b8b6ff2f..3a12fc84 100644
--- a/preproc.c
+++ b/preproc.c
@@ -1584,8 +1584,7 @@ static bool if_condition(Token * tline, enum preproc_token ct)
goto iftype;
iftype:
- tline = expand_smacro(tline);
- t = tline;
+ t = tline = expand_smacro(tline);
while (tok_type_(t, TOK_WHITESPACE) ||
(needtype == TOK_NUMBER &&
@@ -1611,6 +1610,14 @@ static bool if_condition(Token * tline, enum preproc_token ct)
}
break;
+ case PPC_IFEMPTY:
+ t = tline = expand_smacro(tline);
+ while (tok_type_(t, TOK_WHITESPACE))
+ t = t->next;
+
+ j = !t; /* Should be empty */
+ break;
+
case PPC_IF:
t = tline = expand_smacro(tline);
tptr = &t;