Why does the C preprocessor in GCC interpret the word linux
(small letters) as the constant 1
?
test.c:
#include <stdio.h>
int main(void)
{
int linux = 5;
return 0;
}
Result of $ gcc -E test.c
(stop after the preprocessing stage):
....
int main(void)
{
int 1 = 5;
return 0;
}
Which -of course- yields an error.
(BTW: There is no #define linux
in the stdio.h file.)
转载于:https://stackoverflow.com/questions/19210935/why-does-the-c-preprocessor-interpret-the-word-linux-as-the-constant-1