News for hackers. Stuff that matters.
Re:Proposal for a Friendly Dialect of C by rayiner on Wednesday August 27, 2014 @03:07PM (#8234104)
Read the semantics of the undefined value in LLVM: http://llvm.org/docs/LangRef.html#undefined-values.

> the short answer is that an ‘undef‘ “variable” can arbitrarily change its value over its “live range”. This is true because the variable doesn’t actually have a live range. Instead, the value is logically read from arbitrary registers that happen to be around when needed, so the value is not necessarily consistent over time.

An undefined value is both unspecified but also need not be the same unspecified value over multiple uses. This can result in surprising behavior when you're reading code, where you tend to assume that even if the value of a variable is unknown, different uses of it will be consistent with respect to each other.

There are no comments on this comment yet.