All of lore.kernel.org
 help / color / mirror / Atom feed
From: Srinivasa T N <seenutn@linux.vnet.ibm.com>
To: Krzysztof <kj@limes.com.pl>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: Is it helpful for a compiler to optimize?
Date: Mon, 04 Jun 2012 19:39:07 +0530	[thread overview]
Message-ID: <4FCCC183.1030005@linux.vnet.ibm.com> (raw)
In-Reply-To: <jqf201$j23$1@dough.gmane.org>

Why don't you generate the assembly code for both the versions with -s 
and -O<lvl>?

Regards,
Seenu.

On 06/03/2012 12:29 PM, Krzysztof wrote:
> 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.
>


  reply	other threads:[~2012-06-04 14:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-03  6:38 Is it helpful for a compiler to optimize? Krzysztof
2012-06-03  6:59 ` Krzysztof
2012-06-04 14:09   ` Srinivasa T N [this message]
2012-06-03  8:03 ` Jesse Ruffin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FCCC183.1030005@linux.vnet.ibm.com \
    --to=seenutn@linux.vnet.ibm.com \
    --cc=kj@limes.com.pl \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.