noalias macro bug [was: Linux and aliasing?]
mark@codesourcery.com
mark@codesourcery.com
Tue Jun 8 16:08:00 GMT 1999
>>>>> "Jamie" == Jamie Lokier <egcs@tantalophile.demon.co.uk> writes:
Jamie> mark@codesourcery.com wrote:
>> First, it's silly to keep saying this. We're outside standard
>> behavior, so "proof" based on standardese is not an issue.
>> Documented behavior is one issue, and the code in GCC itself is
>> another issue.
Jamie> Aren't we talking about conformant code?
No. There's *no* conformant way to do the kind of thing Linus wants,
except to use memcpy, or other means of copying through a char*.
Jamie> I still don't get the wording. Do you mean "permitted to
Jamie> access *any objects with the same type* as the unionized
Jamie> fields"
Yes.
Jamie> I'm worried when you say `noalias' is outside standard
Jamie> behaviour, since it means we're depending on undocumented
Jamie> GCC-specific behaviour. Clearly we don't want to do that.
Then you have to use memcpy.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
More information about the Gcc
mailing list