I combed my rules of behavior undefined and read the following:
Undefined behavior and sequence pointsWhy is the behavior of f (i = -1, i = -1) undefined?Why is `x--> 0` not undefined, but is` x = x -`?
And in C ++ 11, the behavior of `i + = ++ i + 1` demonstrates undefined behavior?
And it ended with three questions:
i=i++
i.operator(i.operator++(i))
f(i=-1, i=-1)
f(-1, -1)
op=
Forget about f (i = -1, i = -1). Suppose you have two pointers int* pand int* q, and you call
f (i = -1, i = -1)
int* p
int* q
f (*p = 1, *q = 2)
undefined, p == q. , undefined, p == q? ( , , undefined, - ). , , , 99.999% , - ?
f (*p = -1, *q = -1)
. , , , ?