public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dale Johannesen <dalej@apple.com>
To: Bernardo Innocenti <bernie@develer.com>
Cc: Dale Johannesen <dalej@apple.com>,
	Richard Henderson <rth@twiddle.net>,
	Andrea Arcangeli <andrea@suse.de>,
	Linus Torvalds <torvalds@osdl.org>,
	linux-kernel@vger.kernel.org,
	Peter Chubb <peter@chubb.wattle.id.au>,
	Andrew Morton <akpm@digeo.com>, Ian Molton <spyro@f2s.com>,
	gcc@gcc.gnu.org
Subject: Re: [PATCH] Fix do_div() for all architectures
Date: Thu, 10 Jul 2003 12:53:44 -0700	[thread overview]
Message-ID: <3645F0F8-B310-11D7-890F-000393D76DAA@apple.com> (raw)
In-Reply-To: <200307102131.45474.bernie@develer.com>

On Thursday, July 10, 2003, at 12:31  PM, Bernardo Innocenti wrote:
>
>  The compiler could easily tell what memory can be clobbered by a 
> pointer
> by applying type-based aliasing rules. For example, a function taking a
> "char *" can't clobber memory objects declared as "long bar" or
> "struct foo".

No, for two reasons.  First, anything can be aliased by a char.  Second,
the restriction is on the type of the eventual memory reference,
not on the type of the pointer.  Assuming an int* p, you can still do 
*((char*)p) and
that may alias anything.  So you must check each dereference; this 
can't be
done easily at function entry.


  reply	other threads:[~2003-07-10 19:40 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-05 23:33 [PATCH] Fix do_div() for all architectures Bernardo Innocenti
2003-07-06  7:47 ` Russell King
2003-07-06 15:40   ` Ian Molton
2003-07-07  4:26 ` Bernardo Innocenti
2003-07-08 18:27   ` Bernardo Innocenti
2003-07-08 18:31     ` Andrew Morton
2003-07-08 20:56       ` Bernardo Innocenti
2003-07-10 15:40     ` Richard Henderson
2003-07-10 16:18       ` Andrea Arcangeli
2003-07-10 16:39         ` Richard Henderson
2003-07-10 19:31           ` Bernardo Innocenti
2003-07-10 19:53             ` Dale Johannesen [this message]
2003-07-10 20:19             ` Andrea Arcangeli
2003-07-10 22:58               ` Bernardo Innocenti
2003-07-10 22:04             ` Richard Henderson
2003-07-10 23:13       ` Bernardo Innocenti
  -- strict thread matches above, loose matches on Subject: below --
2003-07-02 16:16 [PATCH] Kill div64.h dupes, parenthesize do_div() macro params Linus Torvalds
2003-07-03 10:43 ` [PATCH] Fix do_div() for all architectures Bernardo Innocenti

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=3645F0F8-B310-11D7-890F-000393D76DAA@apple.com \
    --to=dalej@apple.com \
    --cc=akpm@digeo.com \
    --cc=andrea@suse.de \
    --cc=bernie@develer.com \
    --cc=gcc@gcc.gnu.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter@chubb.wattle.id.au \
    --cc=rth@twiddle.net \
    --cc=spyro@f2s.com \
    --cc=torvalds@osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox