[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Let's talk about order of assignment
- From: Jay Carlson <nop@...>
- Date: Wed, 17 Sep 2014 15:59:56 -0400
On Sep 17, 2014 3:08 PM, "Philipp Janda" <siffiejoe@gmx.net> wrote:
>
> Am 17.09.2014 um 20:30 schröbte Hao Wu:
>
>> On Wed, Sep 17, 2014 at 11:24 AM, Axel Kittenberger <axkibe@gmail.com> wrote:
>>>
>>>> I just assume undefined behavior.
>>>
>>>
>>> It _is_ undefined. C does not give any guarantee which side of '+' is
>>
>>
>> it is _unspecified_
>
>
> You are both right :-)
>
> The order of evaluation of subexpressions is unspecified, but multiple modifications of an lvalue between two sequence points invokes undefined behavior.
I'm right too! If I rewrite the function I don't have to remember!
- References:
- Let's talk about order of assignment, Thiago L.
- Re: Let's talk about order of assignment, Mike Nelson
- Re: Let's talk about order of assignment, Coda Highland
- Re: Let's talk about order of assignment, Tom N Harris
- Re: Let's talk about order of assignment, Axel Kittenberger
- Re: Let's talk about order of assignment, Tim Hill
- Re: Let's talk about order of assignment, Jay Carlson
- Re: Let's talk about order of assignment, Axel Kittenberger
- Re: Let's talk about order of assignment, Hao Wu
- Re: Let's talk about order of assignment, Philipp Janda