This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Null pointer check elimination
- From: Paul Brook <paul at codesourcery dot com>
- To: gcc at gcc dot gnu dot org
- Cc: Gabriel Dos Reis <gdr at integrable-solutions dot net>,Per Bothner <per at bothner dot com>,Anthony Green <green at redhat dot com>,java at gcc dot gnu dot org
- Date: Sat, 12 Nov 2005 18:44:36 +0000
- Subject: Re: Null pointer check elimination
- References: <1131747852.3205.105.camel@localhost.localdomain> <437620D9.9090701@bothner.com> <m34q6hyaxr.fsf@uniton.integrable-solutions.net>
On Saturday 12 November 2005 18:32, Gabriel Dos Reis wrote:
> 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
No. We've had this discussion before, and the conclusion what that reference
types can be NULL.
http://gcc.gnu.org/ml/gcc-patches/2004-08/msg01463.html
Paul