Is the expression (a = b) = k UB?

Is the behavior (a = b ) = k undefined if a, b and k are of type int and are correctly initialized?

thanks

+4
source share
1 answer

Looks UB to me. a modified more than once at two points in the sequence.

The result (a=b) is lvalue 1 which is a reference to a

1 Result The assignment operation is the value stored in the left operand after the assignment is completed; The result is an lvalue ($ 5.17 / 1).

+8
source

All Articles