No, partly the reason for undefined / behavior-defined implementation exists in the standard. Undefined behavior cannot be the same between several compilers of the same source code on the same computer (say, with different optimization flags).
The committee clearly prefers well-defined behavior. The behavior defined by the implementation exists when the committee believes that there are several implementations for a concept, and there is no reason to prefer one after the other in all cases. Undefined behavior exists when a committee considers it too difficult to maintain promises in reasonable implementations.
In many cases, Undefined behavior is implemented as something without validation. The behavior then depends on the operating system, if any, and if it notices something less than kosher.
As an example, dereferencing memory that you are not is undefined. In general, the OS will kill your program if you do. However, if the stars are aligned to the right, you will be able to dereference a memory that you do not own in accordance with C ++ rules (for example, you have not received it from new , or already delete d it), but the OS believes that you own it. Sometimes you will crash, and sometimes you will just corrupt memory somewhere else in your program, and sometimes you will avoid undetected ones (if, for example, the memory has not been returned).
Race conditions are considered undefined, and they are known to be different during different program runs. You will probably have different settings each time you break the stack if your operating system has not noticed.
Double delete is undefined. They usually crash, but the fact that they are Undefined means that you cannot rely on what is happening.
Max Lybbert Jun 17 '10 at 8:21 2010-06-17 08:21
source share