What is the meaning of undefined behavior?

I can understand that you need to leave a specific implementation behind so that the specific people who implement it know what will happen best, but why has there ever been undefined behavior? Why not just say something else has been implemented?

+4
source share
2 answers

There are many cases where the guaranteed implementation of a certain implementation inevitably leads to overhead.

For example, how to make buffer overflows with specific implementation behavior? Maybe this is an exception, if it is found, or maybe stop the program? But this always requires border checks.

++ , .

, Go, Rust Java, . , .

+6

. , , ( ). , - .

, , undefined. , , undefined. ( ) undefined , .

undefined , .

+4

Source: https://habr.com/ru/post/1670734/


All Articles