This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: IMA vs tree-ssa


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]