C preprocessor interprets word Linux as a constant 1

1124435 pts.
Tags:
GCC
Linux
In Linux, the C preprocessor in GCC keeps interpret the word linux as my constant 1. This is the test C:
#include 
int main(void)
{       
    int linux = 5;
    return 0;
}
But here's the result of $g gcc -E test.c:
....
int main(void)
{
    int 1 = 5;
    return 0;
}
It keeps giving me an error. What should I do?
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • TheRealRaven
    The word "Linux" is a predefined macro in gcc on Linux, replaced with the value "1".
    32,380 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: