Is this a bug?

Neil Booth neil@daikokuya.co.uk
Thu Jan 2 21:46:00 GMT 2003


Songtao Chen wrote:-

> Hi Neil,
> 
> Thanks for replying.
> 
> Can you tell me why the parentheses are irrelevant,
> any doc to support that?

For the same reason that (2) is the same as 2, and not 3.  Like I said,
post-increment returns the value before incrementing.

Neil.

> 
> Songtao
> 
> At 09:23 PM 1/2/2003 +0000, Neil Booth wrote:
> >Songtao Chen wrote:-
> >
> >> Hi there,
> >>
> >> It appears to be a bug to me.
> >
> >No, i++ returns the value before increment.  Parentheses are irrelevant.
> >
> >Neil.
> 



More information about the Gcc-bugs mailing list