mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-03-19 18:00:23 +08:00
Undo broken %elif change, and put in a big comment explaining why the
existing code is correct.
This commit is contained in:
parent
e4b9254447
commit
0c60815d91
12
preproc.c
12
preproc.c
@ -2270,8 +2270,16 @@ do_directive(Token * tline)
|
||||
istk->conds->state = COND_NEVER;
|
||||
else
|
||||
{
|
||||
j = if_condition(tline->next, i);
|
||||
tline->next = NULL; /* it got freed */
|
||||
/*
|
||||
* IMPORTANT: In the case of %if, we will already have
|
||||
* called expand_mmac_params(); however, if we're
|
||||
* processing an %elif we must have been in a
|
||||
* non-emitting mode, which would have inhibited
|
||||
* the normal invocation of expand_mmac_params(). Therefore,
|
||||
* we have to do it explicitly here.
|
||||
*/
|
||||
j = if_condition(expand_mmac_params(tline->next), i);
|
||||
tline->next = NULL; /* it got freed */
|
||||
free_tlist(origline);
|
||||
istk->conds->state =
|
||||
j < 0 ? COND_NEVER : j ? COND_IF_TRUE : COND_IF_FALSE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user