• nybble41@programming.dev
    link
    fedilink
    arrow-up
    12
    ·
    9 months ago

    I’m fairly certain that last one is UB in C. The result of an assignment operator is not an lvalue, and even if it were it’s UB (at least in C99) to modify the stored value of an object more than once between two adjacent sequence points. It might work in C++, though.