back to listing index

Why does the C preprocessor interpret the word "linux" as the constant "1"? - Stack Overflow

[web search]
Original source (
Tags: programming linux c prepocessor unix vax gcc
Clipped on: 2013-10-09

Why does the C preprocessor in GCC interpret the word linux (small letters) as the constant 1?


#include <stdio.h>int main(void){           int linux = 5;    return 0;}

Result of $ gcc -E test.c (stop after the preprocessing stage): main(void){    int 1 = 5;    return 0;}

Which -of course- yields an error.

(BTW: There is no #define linux in the stdio.h file.)