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]

Re: proposed patch for gcse.c (delete null pointer checks)


  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


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