Asked • 04/26/19

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

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.)

1 Expert Answer

By:

William M. answered • 12/14/19

Tutor
5 (51)

Experienced College/HS teacher/tutor specialties: Python, Java, C++

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.