IMA vs tree-ssa
Mark Mitchell
mark@codesourcery.com
Mon Mar 8 22:29:00 GMT 2004
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
More information about the Gcc
mailing list