This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: proposed patch for gcse.c (delete null pointer checks)
- To: torvalds at transmeta dot com (Linus Torvalds)
- Subject: Re: proposed patch for gcse.c (delete null pointer checks)
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Mon, 08 Nov 1999 14:16:18 -0700
- cc: gcc at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <80797a$6te$1@palladium.transmeta.com>you write:
> In article <1884.942079409@upchuck>, Jeffrey A Law <law@cygnus.com> wrote:
> >
> >You've dereferenced a null pointer. All bets are off after you do that.
> This
> >is a buggy program, not a bug in the compiler.
>
> Maybe the programmer knows more than you do, Jeff?
>
> Occasionally address zero is a fine address - it can contain magic OS
> data, and that's actually fairly common on older smaller targets, where
> dereferencing a low address is faster than dereferencing some random
> address.
And when dereferencing zero is required we have provided an option so that
you can turn off this optimization.
Dereferencing zero is clearly a violation of standards. If you do it, you're
on your own. Very simple.
It has nothing to do with "the programmer knowing more than I do". Why
do you think everything is personal?
jeff