This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Null pointer check elimination


Paul Brook <paul@codesourcery.com> writes:

| On Saturday 12 November 2005 20:57, Gabriel Dos Reis wrote:
| > Paul Brook <paul@codesourcery.com> writes:
| > | 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
| >
| > That simply means GCC got it wrong.
| 
| If by "GCC got it wrong" you mean several key GCC developers disagree with 
| your opinion

Do you need to get it personal?

| of what the semantics of REFERENCE_TYPE are/should be, then yes.

See, it is not a semantics I made up.  Even people arguing for null
reference recognize it is undefined behaviour.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]