Re: Is it helpful for a compiler to optimize?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Assembler]     [Git]     [Kernel List]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [C Programming]     [Yosemite Campsites]     [Yosemite News]     [GCC Help]

  Powered by Linux