This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: g++ and aliasing bools
- From: Joe Buck <jbuck at synopsys dot COM>
- To: jbuck at synopsys dot COM (Joe Buck)
- Cc: dan at dberlin dot org (Daniel Berlin),mark at codesourcery dot com (Mark Mitchell), jbuck at synopsys dot COM (Joe Buck),neil at daikokuya dot demon dot co dot uk (Neil Booth),pcarlini at unitus dot it (Paolo Carlini), gcc at gcc dot gnu dot org (gcc at gcc dot gnu dot org)
- Date: Mon, 28 Jan 2002 09:57:48 -0800 (PST)
- Subject: Re: g++ and aliasing bools
I wrote:
> But the C aliasing rules completely ignore the question of size, so you're
> bringing up a red herring. The rules have *nothing* to do with whether we
> think that two objects have the same address! It doesn't even come up.
> For that reason, you don't have to waste any time thinking about class
> layout.
This is true for the alias-sets computation: it depends only on types.
However, if we have more information about two accesses that allow
us to prove that they never overlap in memory, we can use that information
as well, and here the memory layout may make a difference.