Re: Is it helpful for a compiler to optimize?
Krzysztof <[email protected]> Sun, 03 Jun 2012 08:59:13 +0200
| Newsgroups | org.kernel.vger.linux-c-programming |
|---|---|
| Message-ID | <[email protected]> |
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.