All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Hancock <hancockr@shaw.ca>
To: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Big GCC bug!!! [Was: Re: Do not misuse Coverity please]
Date: Wed, 30 Mar 2005 17:57:49 -0600	[thread overview]
Message-ID: <424B3CFD.5050402@shaw.ca> (raw)
In-Reply-To: <3NUDL-DU-13@gated-at.bofh.it>

Kyle Moffett wrote:
> Dereferencing null pointers is relied upon by a number of various
> emulators and such, and is "platform-defined" in the standard, so
> since Linux allows mmap at NULL, GCC shouldn't optimize that case
> any differently.

 From the GCC manual: "The compiler assumes that dereferencing a null 
pointer would have halted the program. If a pointer is checked after it 
has already been dereferenced, it cannot be null. In some environments, 
this assumption is not true, and programs can safely dereference null 
pointers. Use -fno-delete-null-pointer-checks to disable this 
optimization for programs which depend on that behavior. "

-- 
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/


       reply	other threads:[~2005-03-30 23:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3NC4e-1X1-21@gated-at.bofh.it>
     [not found] ` <3NGrd-5rX-21@gated-at.bofh.it>
     [not found]   ` <3NQgW-5h6-41@gated-at.bofh.it>
     [not found]     ` <3NR3q-5YI-59@gated-at.bofh.it>
     [not found]       ` <3NUDL-DU-13@gated-at.bofh.it>
2005-03-30 23:57         ` Robert Hancock [this message]
2005-03-30  1:25 Do not misuse Coverity please (Was: sound/oss/cs46xx.c: fix a check after use) Horst von Brand
2005-03-30  7:53 ` Do not misuse Coverity please Jean Delvare
2005-03-30 18:29   ` Shankar Unni
2005-03-30 19:14     ` Paulo Marques
2005-03-30 23:11       ` Big GCC bug!!! [Was: Re: Do not misuse Coverity please] Kyle Moffett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=424B3CFD.5050402@shaw.ca \
    --to=hancockr@shaw.ca \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.