The consensus of stackoverflow questions say that it is undefined behaviour.
However, I recently saw a 2016 talk by Charles Bay titled:
Instruction Reordering Everywhere: The C++ 'As-If" Rule and the Role of Sequence.
At 37:53 he shows the following:
C++ Terms
Undefined Behaviour: Lack of Constraints
(order of globals initialization)Unspecified Behaviour: Constraint Violation
(dereferencing NULL pointer)
Now I have conflicting information.
Was this a typo? Has anything changed?