From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2071 invoked by alias); 17 Dec 2009 11:32:13 -0000 Received: (qmail 2060 invoked by uid 22791); 17 Dec 2009 11:32:12 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_50,SPF_PASS X-Spam-Check-By: sourceware.org Received: from exprod6og106.obsmtp.com (HELO exprod6og106.obsmtp.com) (64.18.1.191) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Thu, 17 Dec 2009 11:32:09 +0000 Received: from source ([192.150.11.134]) by exprod6ob106.postini.com ([64.18.5.12]) with SMTP ID DSNKSyoWt5bXQfhapd8ab2DrTO9brTzExr5T@postini.com; Thu, 17 Dec 2009 03:32:09 PST Received: from inner-relay-2.corp.adobe.com ([153.32.1.52]) by outbound-smtp-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id nBHBOb18000694; Thu, 17 Dec 2009 03:24:37 -0800 (PST) Received: from nahub02.corp.adobe.com (nahub02.corp.adobe.com [10.8.189.98]) by inner-relay-2.corp.adobe.com (8.12.10/8.12.10) with ESMTP id nBHBW606007710; Thu, 17 Dec 2009 03:32:06 -0800 (PST) Received: from nambxv01a.corp.adobe.com ([10.8.189.95]) by nahub02.corp.adobe.com ([10.8.189.98]) with mapi; Thu, 17 Dec 2009 03:32:06 -0800 From: "John (Eljay) Love-Jensen" To: "W.H. Kalpa Pathum" , gcc-help Date: Thu, 17 Dec 2009 12:20:00 -0000 Subject: RE: Could you please explain this code segment Message-ID: <4B7A6CC9992C4E4FB188D02872C90A6B134D1F@nambxv01a.corp.adobe.com> References: <79fa0d5a0912162253p49d17f36s2e65d4be8394df69@mail.gmail.com> In-Reply-To: <79fa0d5a0912162253p49d17f36s2e65d4be8394df69@mail.gmail.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2009-12/txt/msg00255.txt.bz2 Hi W.H.Kalpa Pathum, > Could you please explain how the output differs...? The output differs because the increment operators are being used in such a= s way as to be undefined behavior. > ...the way the compiler executes each segment of the variable? Each compiler can execute each segment of the variable differently. And ma= y vary from version of the compiler to another version of the compiler. An= d also may vary with the same compiler using different optimization levels. HTH, --Eljay