This is the simplest example of my question:
#include<stdio.h>
int main() {
printf("%s:%s\n", "I am in file" __FILE__);
}
When I forget to insert a comma before "__FILE__" macro, I expect to get a compile error, but just get a warning. So the output will be:
I am in filetest.c:[C
- 1st string will be : "I am in file" concatenate with __FILE__ macro
- 2nd string will be undefined
Could someone tell me why it is not a compile error?