3 ms·
Everything not defined in the spec represents undefined behavior, not just the things explicitly disclaimed as undefined. Not every instance of undefined behavi
by twoodfin 11y ago
Everything not defined in the spec represents undefined behavior, not just the things explicitly disclaimed as undefined. Not every instance of undefined behavior has explicit handling in a compiler; sometimes, undefined behavior occurs as part of the implicit functioning of the compiler implementation.
The C and C++ standards make clear separations between "undefined behavior", "unspecified behavior", and "implementation defined behavior".
Order of argument evaluation is not undefined behavior, it's unspecified behavior. A standard-compliant implementation can choose any order it wants in any instance, it doesn't have to document this behavior, but it does have to produce output consistent with some ordering. It can't erase your hard disk or launch the nuclear missiles, which it could do if it encountered undefined behavior.