preproc: fix varadic macros, add conditional comma operator
commita1a844697daabe0e8c493c6abada8049431b7fd2
authorH. Peter Anvin (Intel) <hpa@zytor.com>
Tue, 20 Aug 2019 08:32:28 +0000 (20 01:32 -0700)
committerH. Peter Anvin (Intel) <hpa@zytor.com>
Tue, 20 Aug 2019 08:32:28 +0000 (20 01:32 -0700)
treecea9617f7dfbf63ec5cfdfe4e0d272be5d18a736
parent62cf4aaef6a6216fd0921f1ced4671dee6053d9f
preproc: fix varadic macros, add conditional comma operator

Fix the (severely broken handling of) varadic macros.

Add a conditional comma operator "%,". This expands to a comma unless
followed by a null expansion of some sort, which allows suppressing
the comma before an empty argument (usually varadic, but not
necessarily.)

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
asm/preproc.c
test/gsmacro.asm [new file with mode: 0644]