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]

strict aliasing benefit examples


I often need to convince people that gcc is not just
defective for doing random nonsense to code which
violates the C and C++ aliasing rules. Not that I'm
real sure myself actually, given that gcc is able to
generate warnings for all the normal cases, but anyway...
I'm up against the idea that Visual Studio is correct
and gcc is buggy crap. :-)  Very few professional
software developers can handle the aliasing issue.

So I could use some teaching examples.

Think "PowerPoint". Heh, OK, I'll use OpenOffice.org
Impress, but you get the idea I think.

Realistic code matters. Contrived examples won't
convince anyone.

People care about 32-bit x86, not IA-64. AMD64 and
PowerPC count for something, but not much.

The best examples would involve optimizations which
could not be performed if gcc did what people normally
expect from a simple pointer cast and wrong-type access.
I doubt such examples exist, but I hope they do.


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