Skip to content

Comment on Undefined Behavior in C and C++parent

Comments

In what sense? C and C++ aren’t memory safe, so the specification has to say something about what happens if you’re dereferencing an invalid pointer (random value, out of bounds, frees pointer, etc).

That’s what UB exists for: there’s no behaviour we can actually define for some operations.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.