[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]

null references & dereferencing null pointers



Proposed:

1) That null references explicitly be defined as legal in the language.  A 
null reference is that which is created from a "dereferenced" null pointer
such as follows:

	FOO& fooref = *((FOO*)0);

2) That "dereferencing" null pointers except in the initialization of references
be explicitly defined as not legal in the language.  The exact effect
of dereferencing a null pointer would be "implementation defined", but the
intent is that no legal object can be referenced via a null pointer.

[disclaimer: this posting represents the opinions of an individual C++ user]