Asked • 05/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.)

4 Answers By Expert Tutors

By:

Connor M. answered • 05/27/19

Tutor
5.0 (238)

Basics-First Math, Computer Science, and Exam Prep Tutor

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.