is there any way to access individual elements in the body
of a variadic macro? I only found __VA_ARGS__, which always
expands to the complete list.
Twelve hours, and not a single language lawyer has come along to explain
that you can't. That's because your question is about C99, and the
luddite regulars in this group won't tolerate any discussion of C
standards more recent than the fall of the Berlin Wall.
Anyway, to answer your question, no there's no way in standard C...
there's not even any way using gcc extensions. I don't know about MS or
lcc extensions - maybe you can with them.
To understand why the answer is no, think about how you'd go about
finding out how many arguments were passed to your variadic function...
now ponder doing that in a macro.
The only purpose of variadic macros is to facilitate providing default
arguments for calls to variadic functions, like the usual
fprintf(stderr, __VA_ARGS__) example.