Null pointer check elimination

Gabriel Dos Reis gdr@integrable-solutions.net
Sat Nov 12 20:56:00 GMT 2005


Andrew Pinski <pinskia@physics.uc.edu> writes:

| > 
| > Per Bothner <per@bothner.com> writes:
| > 
| > | 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.
| > 
| > We already have such mechanism: a reference type -- which morally is
| > implemented as a pointer type.
| 
| That was mentioned a way ago as being wrong.  A reference type can be NULL.

You have to explain me why a reference can be null.

-- Gaby



More information about the Java mailing list