An invalid pointer has an indeterminate state that cannot be safely evaluated. Evaluating it produces an invalid value and places the program in an undefined state. section 6.2
An uninitialized pointer
char const*const p2invalid;\n\nBecause p2invalid is uninitialized, its state is indeterminate. Reading or otherwise evaluating it can fail; initialize a pointer or set it to null when validity cannot be guaranteed. section 6.2
Keep these pointer-safety rules in view:
- Do not confuse invalid and null pointers: logical tests can identify null pointers but cannot reliably distinguish valid pointers from invalid ones. section 6.2
- Do not dereference an invalid pointer. Using * with one can fail, potentially accessing an unintended memory object and causing difficult-to-trace bugs. section 11.1.1
char const*const p2invalid;
Inspect the uninitialized declaration that demonstrates how an indeterminate pointer state arises. section 6.2
