From: Fergus Henderson <fjh@cs.mu.OZ.AU>
To: Brad Lucier <lucier@math.purdue.edu>
Cc: gcc@gcc.gnu.org
Subject: Re: strict-aliasing and typedefs
Date: Wed, 14 May 2003 21:07:00 -0000 [thread overview]
Message-ID: <20030514210727.GA16214@ceres.cs.mu.oz.au> (raw)
In-Reply-To: <200305142056.h4EKujuX025820@banach.math.purdue.edu>
On 14-May-2003, Brad Lucier <lucier@math.purdue.edu> wrote:
> I've read the documentation and done a google and gcc search, but
> I still have this question.
>
> If I have the typedefs and variables
>
> typedef int stackslot;
> typedef int heapslot;
>
> stackslot *sp;
> heapslot *hp;
>
> then can sp and hp point to the same location in memory with
> ISO C's aliasing rules?
Yes.
> I'm wondering if a Scheme->C compiler
> can use typedefs and ISO C's aliasing rules to tell gcc that certain
> memory locations cannot alias each other.
I don't think so.
You might be able to do it using single-member structs instead of typedefs;
but doing that might inhibit some of GCC's other optimizations.
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
next prev parent reply other threads:[~2003-05-14 21:07 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-14 20:56 Brad Lucier
2003-05-14 21:07 ` Fergus Henderson [this message]
2003-05-14 21:28 ` Gabriel Dos Reis
2003-05-14 21:08 ` Gabriel Dos Reis
2003-05-14 21:21 ` Joe Buck
2003-05-14 21:30 ` Gabriel Dos Reis
2003-05-14 21:41 ` Joe Buck
2003-05-14 21:53 ` Gabriel Dos Reis
2003-05-14 22:17 ` Gabriel Dos Reis
2003-05-14 22:29 ` two-element struct performance (was: strict-aliasing and typedefs) Joe Buck
2003-05-14 22:49 ` Gabriel Dos Reis
2003-05-14 23:06 ` Joe Buck
2004-02-20 0:43 ` law
2004-02-20 9:06 ` Richard Henderson
2004-02-20 15:21 ` law
2004-02-24 6:19 ` law
2004-02-24 10:29 ` Gabriel Dos Reis
2004-02-24 10:44 ` Paolo Carlini
2003-05-14 21:21 ` strict-aliasing and typedefs Andreas Schwab
2003-05-14 21:32 ` Gabriel Dos Reis
2003-05-14 21:46 ` Brad Lucier
2003-05-14 21:56 ` Gabriel Dos Reis
2003-05-14 21:47 ` Daniel Jacobowitz
2003-05-14 21:59 ` Gabriel Dos Reis
2003-05-14 22:04 ` Daniel Jacobowitz
2003-05-14 22:07 ` Brad Lucier
2003-05-14 22:11 ` Gabriel Dos Reis
2003-05-14 21:38 Robert Dewar
2003-05-14 23:10 Robert Dewar
2003-05-14 23:14 ` Joe Buck
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=20030514210727.GA16214@ceres.cs.mu.oz.au \
--to=fjh@cs.mu.oz.au \
--cc=gcc@gcc.gnu.org \
--cc=lucier@math.purdue.edu \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).