I don't understand why this doesn't print out "this is a test 42" like I'm expecting it to?
1 #include <stdio.h>
2 #include <stdarg.h>
3
4 #define ME(x) blah x
5
6 void blah(const char *fmt, ...)
7 {
8 va_list arg;
9
10 va_start(arg, fmt);
11 printf(fmt, arg);
12 va_end(arg);
13 }
14
15 int main()
16 {
17 ME(("this is a test %d\n", 42));
18
19 return 0;
20 }
Instead it's something like this:
$ gcc blah.c
$ ./a.out
this is a test 1606416656