[feat] support the variadic `(arg...)` argument extension for CPP macros
Closed this issue · 1 comments
Tal500 commented
It would be helpful if simplecpp
will support variadic argument extension of named variadic in macro.
From https://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html:
If your macro is complicated, you may want a more descriptive name for the variable argument than VA_ARGS. CPP permits this, as an extension. You may write an argument name immediately before the ‘...’; that name is used for the variable argument. The eprintf macro above could be written :
#define eprintf(args...) fprintf (stderr, args)
Right now, we are forced to convert this code to:
#define eprintf(...) fprintf (stderr, __VA_ARGS__)
Tal500 commented
My fault, it is already supported