From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17591 invoked by alias); 27 Mar 2004 02:01:34 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 17463 invoked from network); 27 Mar 2004 02:01:31 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 27 Mar 2004 02:01:31 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i2R21V1X018518; Fri, 26 Mar 2004 21:01:31 -0500 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i2R21Vj14747; Fri, 26 Mar 2004 21:01:31 -0500 Received: from [10.0.0.106] (dnovillo.cipe.redhat.com [10.0.0.106]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id i2R21Tf7003190; Fri, 26 Mar 2004 21:01:29 -0500 Subject: Re: Question for ISO C standards gurus From: Diego Novillo To: Ian Lance Taylor Cc: "gcc@gcc.gnu.org" In-Reply-To: References: <1080348071.4600.244.camel@localhost.localdomain> Content-Type: text/plain Organization: Red Hat Canada Message-Id: <1080352873.4600.253.camel@localhost.localdomain> Mime-Version: 1.0 Date: Sat, 27 Mar 2004 14:25:00 -0000 Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03/txt/msg01614.txt.bz2 On Fri, 2004-03-26 at 20:25, Ian Lance Taylor wrote: > I can't see any reason why that would print 5. Based on the above, p > should be incremented before the function call to foo(). But that > doesn't change the value of *p++, which means "get the value at *p, > then increment p". The above just means that this should not happen: > t1 = *p; > foo (t1); > p = p + 1; > Thanks. Now I know what the bug is, then. Diego.