On Sunday 13 November 2005 08:23, Richard Kenner 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.
>
> I thought the idea being proposed was a flag on a type where we were
> *asserting* that all objects of that type were non-NULL, not where we
> have to prove it.  Such types do exist at the language level for some
> languages.
>
Yeah, check the rest of the thread.  I had originally missed that point.  
To summarize, either marking the function or marking its type is the same 
from my point of view.  Both approaches give the optimizers the exact same 
information.

So, I will leave it up to the FE folks to figure out how they want to mark 
the non-NULL attribute.

Reply via email to