BR 3392893: preproc: correctly handle empty %rep blocks

When expanding %rep blocks, if any of the %rep blocks are empty, there
may be need to unwind the %rep stack multiple times. The code would
not do so -- there was a break; in the loop, which incidentally turned
it into something that wasn't a loop at all.

Reported-by: E. C. Maslock <pushbx@ulukai.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin 2023-10-13 20:51:52 -07:00
parent dcac46d973
commit 2e9120e56f

View File

@ -7633,7 +7633,8 @@ static Token *pp_tokline(void)
ll->where = l->where;
istk->expansion = ll;
}
break;
l = istk->expansion;
continue;
} else {
MMacro *m = istk->mstk.mstk;