What should the behavior above be defined to do?
Print x twice. Not all “side effects” care about order.
Better yet, define an order for parameter evaluation.
Couldn’t you just define that function arguments are evaluated left to right?
Or just throw an error.
“Implementation defined behaviour”: compiler author chooses, and documents the choice.
A lot of UB should be implementation defined behaviour instead; this would much better match programmers’ intuitions as they reason about their code - you can even see it in the comments of this post: it’s always things like “this hardware supports / doesn’t support unaligned accesses”, it’s never nasal demons.