Problem with operator

Neil Booth neil@daikokuya.demon.co.uk
Sun Sep 30 02:59:00 GMT 2001


Anjan Goswami wrote:-

> 
> Try this code.
> 
> int main()
> {
>     int a= 5, b=2, c;
> 
> 	c = a - - - - - -   b * 10 ;
>         printf("c=%d\n",c);

This is 5 unary operators, one binary.  Therefore the same as

c = a - (-b) * 10;

Which where I live is indeed

> /* c=25! */

So I don't see a problem.

Neil.



More information about the Gcc-bugs mailing list