Per Bothner wrote:
A "function-never-returns-null" attribute doesn't seem like the right mechanism. Instead, there should be a "never-null" attribute on pointer types. A "function-never-returns-null" is just a function whose return-type has the "never-null" attribute.
Gabriel Does Reis wrote:
We already have such mechanism: a reference type -- which morally is implemented as a pointer type.
Andrew Pinski wrote:
That was mentioned a way ago as being wrong. A reference type can be NULL.
There are other differences, at least in C++: If you assign to a pointer, you change the pointer, while if you assign to a reference you modify the referenced object. I.e. if a variable has reference type, then the reference itself is constant. -- --Per Bothner [EMAIL PROTECTED] http://per.bothner.com/