Here you need to make a variable macro (a macro that can take several arguments) if you pass 0 arguments.
From the Variadic Macros section of the GCC Guide:
Secondly, the # paste token operator has special meaning when placed between a comma and a variable argument. If you write
#define eprintf(format, ...) fprintf (stderr, format, ##__VA_ARGS__)
and the variable argument is not used when the eprintf macro is eprintf , then the comma before ## will be removed. This does not happen if you pass an empty argument, and it does not happen if the token preceding ## is something other than a comma.
eprintf ("success!\n") ==> fprintf(stderr, "success!\n");
If you have not used this, then it will expand to frpintf(stderr, "success!\n",) , which is a syntax error.
source share