Discussing the "bit-pattern validity" of references: the part that can be defined without referring to memory.
Certainly, references are non-NULL. Following the current lowering to LLVM, they also must be aligned. This is in conflict with creating references to fields of packed structs, see RFC 2582 for a proposed solution.
Do we want to allow uninitialized bits? Theoretically we could allow something like 0xUU000001 (on 32bit, where U represents 4 uninitialized bits) for &(), but there seems to be little point in doing so.
Discussing the "bit-pattern validity" of references: the part that can be defined without referring to memory.
Certainly, references are non-NULL. Following the current lowering to LLVM, they also must be aligned. This is in conflict with creating references to fields of packed structs, see RFC 2582 for a proposed solution.
Do we want to allow uninitialized bits? Theoretically we could allow something like
0xUU000001(on 32bit, whereUrepresents 4 uninitialized bits) for&(), but there seems to be little point in doing so.