Created
March 11, 2020 08:11
-
-
Save whitty/8562d9f65b52c3437b681f3e277a8dca to your computer and use it in GitHub Desktop.
Gives error: test.c:10:0: error: failed to expand 'LOGTRACE', it is invalid to use a preprocessor directive as macro parameter [preprocessorErrorDirective]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define LOGTRACE(...) fprintf(stderr, __VA_ARGS__); | |
int main(void) | |
{ | |
#ifdef ALT_FORMAT | |
LOGTRACE("abc %u def %u ghi %u\n", | |
#else | |
LOGTRACE("abcdefghi %u, %u, %u\n", | |
#endif | |
123, 456, 789); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment