N
Noob
Hello,
I've been reading about variadic macros, and have a few questions.
http://en.wikipedia.org/wiki/Variadic_macro
I don't find the term "variadic" in ISO/IEC 9899:TC3. Did the standard
committee avoid that word for some reason?
Is the Wikipedia article correct that variadic macros are supported in
C99 but not in C89?
Is it possible in C89 to write a function-like macro wrapping a variadic
function which has no va_list flavor (a la vprintf)?
Do you agree that writing
#define MYDEBUG printf
is poor style?
(triggers a "statement with no effect" warning, when MYDEBUG is set to
NOP, among other problems.)
Regards.
I've been reading about variadic macros, and have a few questions.
http://en.wikipedia.org/wiki/Variadic_macro
I don't find the term "variadic" in ISO/IEC 9899:TC3. Did the standard
committee avoid that word for some reason?
Is the Wikipedia article correct that variadic macros are supported in
C99 but not in C89?
Is it possible in C89 to write a function-like macro wrapping a variadic
function which has no va_list flavor (a la vprintf)?
Do you agree that writing
#define MYDEBUG printf
is poor style?
(triggers a "statement with no effect" warning, when MYDEBUG is set to
NOP, among other problems.)
Regards.