[PATCH 06/11] Sptr: avoided potentially undefined behaviour.

Andrew Clayton andrew at digital-domain.net
Thu Jun 16 17:43:23 UTC 2022

On Thu, 16 Jun 2022 17:32:22 +0200
Alejandro Colomar <alx.manpages at gmail.com> wrote:

> Hmmm, AFAIR, `u.a = u.b + 1;` is fine, since the = creates a sequence 
> point, isn't it?
> <https://stackoverflow.com/a/33291213/6872717>

So we're saying that

    6.5.16 (p3):

    [...] The side effect of updating the stored value of the left operand
    is sequenced after the value computations of the left and right operands.

makes it OK?


More information about the unit mailing list