delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/01/29/21:44:58

X-Spam-Check-By: sourceware.org
Date: Sun, 29 Jan 2006 21:44:45 -0500 (EST)
From: Igor Peshansky <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Brett Serkez <techie AT serkez DOT net>
cc: cygwin AT cygwin DOT com, Vadim Oganesyan <vadim DOT oganesyan AT yale DOT edu>
Subject: Re: bizarre g++ behavior after reinstalling cygwin
In-Reply-To: <1138561042.21433.253029430@webmail.messagingengine.com>
Message-ID: <Pine.GSO.4.63.0601292142510.7389@access1.cims.nyu.edu>
References: <Pine DOT LNX DOT 4 DOT 63 DOT 0601291059100 DOT 14268 AT ajax DOT its DOT yale DOT edu> <Pine DOT GSO DOT 4 DOT 63 DOT 0601291251440 DOT 7389 AT access1 DOT cims DOT nyu DOT edu> <1138561042 DOT 21433 DOT 253029430 AT webmail DOT messagingengine DOT com>
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Note-from-DJ: This may be spam

On Sun, 29 Jan 2006, Brett Serkez wrote:

> <snip>
> > "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
> value.

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,
> no?

Right.  But there may be other style mishaps in Vadim's code that gcc 3.4
doesn't like.  We just don't know.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT 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
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019