X-Spam-Check-By: sourceware.org
Message-Id: <1138561042.21433.253029430@webmail.messagingengine.com>
From: "Brett Serkez" <techie@serkez.net>
To: cygwin@cygwin.com, "Vadim Oganesyan" <vadim.oganesyan@yale.edu>
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="ISO-8859-1"
MIME-Version: 1.0
References: <Pine.LNX.4.63.0601291059100.14268@ajax.its.yale.edu>    <Pine.GSO.4.63.0601291251440.7389@access1.cims.nyu.edu>
Subject: Re: bizarre g++ behavior after reinstalling cygwin
In-Reply-To: <Pine.GSO.4.63.0601291251440.7389@access1.cims.nyu.edu>
Date: Sun, 29 Jan 2006 13:57:22 -0500
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Note-from-DJ: This may be spam

<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.  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?

Brett
----------------------------------------------------------------
Brett C. Serkez, Techie


--
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/

