[Info-vax] nice for VMS
Arne Vajhøj
arne at vajhoej.dk
Thu Apr 16 20:30:16 EDT 2009
Bob Koehler wrote:
> In article <49e521a4$0$90271$14726298 at news.sunsite.dk>, =?ISO-8859-1?Q?Arne_Vajh=F8j?= <arne at vajhoej.dk> writes:
>> Call it "lying to the compiler" or "utilizing pointers
>> manipulation to the max".
>
> A properly operating compiler will make no assumptions about
> the content of a pointer. If the compiler can establish by code
> analysis that the pointer is never set to anything unaligned then
> it's OK to generate code that assumes alignment. If the pointer
> is an argument or global the compiler should make no assumptions.
>
> But if the compiler does make incorrect assumptions and the resulting
> code crashes you may not be able to get the vendor to fix it.
If we speak about C then I believe that type of pointer fun is
either undefined or implementation specific behavior, so there
would most certainly not be any point in complaining.
Arne
More information about the Info-vax
mailing list