4 ms·
Clause 6.2.4 of C11, paragraph 2: > The lifetime of an object is the portion of program execution during which storage is guaranteed to be reserved for it. An
by rm445 11y ago
Clause 6.2.4 of C11, paragraph 2:
> The lifetime of an object is the portion of program execution during which storage is guaranteed to be reserved for it. An object exists, has a constant address,33) and retains its last-stored value throughout its lifetime.34) If an object is referred to outside of its lifetime, the behavior is undefined. The value of a pointer becomes indeterminate when the object it points to (or just past) reaches the end of its lifetime.
Like you it seems a bit odd to me - perhaps to make the standard prepared for architectures, existing or otherwise, where pointer values have to be loaded in specific registers, and then trap if they contain values pointing to unallocated pages? (Without being dereferenced).