From mboxrd@z Thu Jan 1 00:00:00 1970 From: Krzysztof Subject: Re: Is it helpful for a compiler to optimize? Date: Sun, 03 Jun 2012 08:59:13 +0200 Message-ID: References: Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-c-programming-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: linux-c-programming@vger.kernel.org On 06/03/2012 08:38 AM, Krzysztof wrote: > > void afun(struct st *stp) > { > int liv=stp->iv++; > > printf("%d\n",liv); > } > Should be: int liv=++stp->iv; of course for equivalence. -- Regards Krzysztof J.