I have the following macro:
#define F(Args, ...) \
// macro definition
#
F(()) // looks like usage?
#undef F
What does the line containing only #
mean? Is F(())
a usage of the macro?
Technically, that's not part of the macro (no continuation line before it).
It's a directive that comes after the #define
directive.
#
on its own line is called a null directive and it does nothing (as good as a comment).
It's no longer practically useful (except as a visual marker) but in prehistoric C, the preprocessor only got invoked if a C source file started with a directive and the null directive placed at the very beginning of a C file was a good way to make sure the file was preprocessed (i.e., that later directives worked) without starting with a concrete directive.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With