The C++ standard contains a semi-famous example of "surprising" name lookup in 3.3.2, "Point of declaration":
int x = x;
x with itself, which (being a primitive type) is uninitialized and thus has an indeterminate value (assuming it is an automatic variable).
Is this actually undefined behaviour?
According to 4.1 "Lvalue-to-rvalue conversion", it is undefined behaviour to perform lvalue-to-rvalue conversion on an uninitialized value. Does the right-hand
x undergo this conversion? If so, would the example actually have undefined behaviour?