This is the mail archive of the gcc-help@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: strict aliasing


Andi Hellmund wrote:

> 
>> First of all is there any website, link or docu (whatever) which lists some
>> examples of what is legal (under strict aliasing) and what is not ?
>>   
> As the C standard is quite formal, here's a handy explanation about
> strict aliasing rules and how they could affect compiler optimizations:
> 
> http://cellperformance.beyond3d.com/articles/2006/06/understanding-strict-aliasing.html

But the C standard is correct.

I don't believe that the technique in CASTING THROUGH A UNION (2)
is correct.

This line:

  3  U32*     in = (U32*)&arg;

is bogus.

Andrew.


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