public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Horst von Brand <brand@jupiter.cs.uni-dortmund.de>
Cc: Art Haas <ahaas@airmail.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	brand@eeyore.valparaiso.cl
Subject: Re: Is -fno-strict-aliasing still needed?
Date: Tue, 11 Feb 2003 10:45:19 +0100	[thread overview]
Message-ID: <jey94nb174.fsf@sykes.suse.de> (raw)
In-Reply-To: <200302110939.h1B9dX6T013616@eeyore.valparaiso.cl> (Horst von Brand's message of "Tue, 11 Feb 2003 10:39:33 +0100")

Horst von Brand <brand@jupiter.cs.uni-dortmund.de> writes:

|> Andreas Schwab <schwab@suse.de> said:
|> > Horst von Brand <brand@jupiter.cs.uni-dortmund.de> writes:
|> > 
|> > |> Art Haas <ahaas@airmail.net> said:
|> > |> > I ask because I've just built a kernel without using that flag -
|> > |> > linus-2.5 BK from this morning, probably missing the 2.5.60 release by
|> > |> > a few hours.
|> > |> 
|> > |> The problem with strict aliasing is that it allows the compiler to assume
|> > |> that in:
|> > |> 
|> > |>      void somefunc(int *foo, int *bar)
|> > |> 
|> > |> foo and bar will _*never*_ point to the same memory area
|> > 
|> > This is wrong.  Only if they are declared restrict.
|> 
|> ... can they point to the same area. That is exactly the problem: If you do
|> nothing, the language definition assumes the programmer made sure (LOL!)
|> that they don't point the same way.

Why are you insisting on spreading misinformation?

Pointers that are _not_ declared as restricted can alias _any_ other
non-restricted pointer of the same target type.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  reply	other threads:[~2003-02-11  9:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-10 20:04 Is -fno-strict-aliasing still needed? Art Haas
2003-02-11  7:14 ` Horst von Brand
2003-02-11  9:12   ` Andreas Schwab
2003-02-11  9:39     ` Horst von Brand
2003-02-11  9:45       ` Andreas Schwab [this message]
2003-02-11 10:24   ` Helge Hafting
  -- strict thread matches above, loose matches on Subject: below --
2003-02-11 19:52 Albert Cahalan

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=jey94nb174.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=ahaas@airmail.net \
    --cc=brand@eeyore.valparaiso.cl \
    --cc=brand@jupiter.cs.uni-dortmund.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox