This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Problem with operator


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]