Hacker News new | ask | show | jobs
by gingerBill 400 days ago
It is "undefined behaviour" in C (which is an overloaded term which I will not discuss why I hate it in this comment). But my point was that is how many people conceptualize it, and for many things people do expect it to be one of the possible values, just not knowable ahead of time.

However, I was using that "C programmers" bit to explain the conceptualization aspect, and how it also applies to other languages. Not every language, even systems languages, have the same concepts as C, especially the same construction as "UB".

2 comments

It is undefined in C for automatic variables whose address was not taken (and in this case a compiler should be able to warn).
As someone who recently wondered what kinds of things might happen, im actually very glad for GPs clarification.