Original question: Why does the C preprocessor interpret the word “linux” as the constant “1”? by ahmedaly50
Why does the preprocessor in GCC interpret the word linux
as the constant 1
?
test.c
#include <stdio.h>
int main(void)
{
int linux = 5;
return 0;
}
Result of $ gcc -E test.c
(for after the pre-processor stage):
int main(void)
{
int 1 = 5;
return 0;
}
Which of course produces an error.
(BTW: There is no one #define linux
in the stdio.h file)