A non-value representation is a bit pattern that makes no sense as a value of its object type. C's type system normally keeps representations separated, but pointer misuse can expose storage through the wrong type. Accessing an object with a non-value representation for its type causes program failure. section 11.1.4 section 15.1.6
Boolean representation
A bool has only two proper values, false and true, although it may use at least 8 representation bits. Writing other bits directly can produce a non-value representation or cause the program to interpret the Boolean inconsistently. Store only 0 or 1 in a bool, and do not modify object representation bytes directly. section 15.1.6
Keep representations valid by following these rules:
- Access an object through its correct type; a pointer must designate an object of the pointed-to type. section 11.1.4
- Do not dereference pointers beyond an array's objects, even when the pointer value itself is valid. section 11.1.4
- Treat uninitialized storage and directly altered representation bytes as dangerous sources of value misinterpretation. section 15.1.6
