This is the mail archive of the
mailing list for the Cygwin project.
Re: bizarre g++ behavior after reinstalling cygwin
On Sun, 29 Jan 2006, Brett Serkez wrote:
> > "i=i++" is either a no-op or nonsense, depending on the
> > interpretation. You should either use "i=i+1" or "i++" (those should
> > be equivalent in modern compilers).
> The strick interpretation of i=i++ starts by evaluating the right side
> "i++" to compute a r-value (right value). Since the ++ is after the i,
> it is a post-operation, vs. if it were before the i, in which case it
> would be a pre-operation. So first the value of i would be saved, then
> i incremented, then the saved value would be assigned to the l-value
> (left value) which in this case is i, setting i back to its original
Yes, that was the nonsence interpretation. :-)
> You could use "i=++i" which would increment i, then save the r- value
> and assign to the l-value, but then again, i++ would be much simplier,
Right. But there may be other style mishaps in Vadim's code that gcc 3.4
doesn't like. We just don't know.
|\ _,,,---,,_ firstname.lastname@example.org | email@example.com
ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!)
|,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html