This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: IMA vs tree-ssa
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Neil Booth <neil at daikokuya dot co dot uk>
- Cc: Geoff Keating <geoffk at geoffk dot org>, Richard Henderson <rth at redhat dot com>, GCC List <gcc at gcc dot gnu dot org>
- Date: Mon, 08 Mar 2004 14:29:25 -0800
- Subject: Re: IMA vs tree-ssa
- Organization: CodeSourcery, LLC
- References: <F0209661-68A9-11D8-8C0E-000A95D7CD40@apple.com> <20040226230842.GA28463@redhat.com> <jmwu698lfu.fsf@desire.geoffk.org> <20040227211712.GB16448@daikokuya.co.uk> <jmoerk8ae8.fsf@desire.geoffk.org> <20040227220212.GC16448@daikokuya.co.uk>
Neil Booth wrote:
Geoff Keating wrote:-
In any case, it's still not transitive, because 'bar' in:
struct foo;
struct bar {
struct foo *f;
};
is compatible with
struct foo { int a; };
struct bar {
struct foo *f;
};
and
struct foo { int b; };
struct bar {
struct foo *f;
};
but they are not compatible with each other.
Has anyone asked the C committee what they think about this?
I strongly expect that their intention was to create a requirement that
compatibility be an equivalence relation. Certainly, there's no reason
to suspect that passing pointers to "struct foo" from the second to
third translation unit above would work, at least if the two "struct
foo" objects were not themselves so similar. I would expect that this
is a defect in the standard.
If so, IMA could just "break" this code in the same way that
strict-aliasing "broke" lots of other "always-worked-for-me" code.
--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com