This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Null pointer check elimination
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: per at bothner dot com (Per Bothner), green at redhat dot com (Anthony Green), java at gcc dot gnu dot org, gcc at gcc dot gnu dot org (GCC Mailing List)
- Date: 12 Nov 2005 21:55:14 +0100
- Subject: Re: Null pointer check elimination
- References: <200511121838.jACIcBge006902@earth.phy.uc.edu>
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