Null pointer check elimination

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


Diego Novillo <dnovillo@redhat.com> writes:
| On Saturday 12 November 2005 12:05, 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.
| >
| I disagree. We would have to prove that every possible instance of this 
| type is non-NULL.

No, you don't have to. Just in the same way you don't have to prove
that a function with "function-never-returns-null" attributes never
returns null.
-- Gaby


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /