Closed mycoboco closed 6 years ago
In recarg()
from mcr.c
, if the first token to the variadic part is a comma, the comma is not merged into a single item because the accumulated number of arguments, n
in the code, is less than the number of parameters, which makes the comma separate arguments.
Giving a comma to the variadic part as the first token cannot:
too many arguments to macro
error;C90 does not support empty argument to macro
warning; and*pnoarg
.But, handling for too many arguments to macro
warning is still necessary.
beluga
's preprocessor goes wrong when the first argument to the variadic part is empty, that is, the first token for__VA_ARGS__
is a comma.For example,
gives