RE: GCC compiler issue - parse error before `&&' token

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Brian,

Could you please tell us the option for allowing them to use as variable
names??
We tried to get that info. But could not get that info!!

Thanks,
Bye,
Kannan.J


-----Original Message-----
From: gcc-help-owner@xxxxxxxxxxx [mailto:gcc-help-owner@xxxxxxxxxxx] On
Behalf Of Brian Budge
Sent: Thursday, March 03, 2005 6:05 PM
To: Gaurav Kansal
Cc: gcc-help@xxxxxxxxxxx
Subject: Re: GCC compiler issue - parse error before `&&' token

The reason it's not backwards compatible in this case is that gcc is
becoming more standards compliant.  Look at the gcc info page for
command line arguments... there is one to allow the use of "and" and
"or" as variable names rather than keywords.

  Brian


On Thu, 3 Mar 2005 16:11:21 +0530, Gaurav Kansal <gkansal@xxxxxxxxxxxxx>
wrote:
> Hi
>  
> I am executing the following piece of code. I have put this in a test.cpp
> file.
> #include <stdio.h>
> int main()
> {
>         int and;
> }
>  
> If I compile this code with g++ (version 2.95.3), it compiles. But if this
> code is compiled with g++ version 3.1.1, 3.2.2 or 3.3.1, it gives the
> following error:
> "parse error before `&&' token"
>  
> I don't understand why the g++ versions are not backward compatible. Is
> there some get around for this problem. I have to use g++ version 3.3.1
> only.
>  
> Regards,
> Gaurav Kansal
>  
> "Every Customer is a Reference Customer"
>  
> 
>



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux