[Numpy-discussion] strict aliasing?
Charles R Harris
Sun May 4 11:25:46 CDT 2008
On Sun, May 4, 2008 at 3:11 AM, Neal Becker <email@example.com> wrote:
> Is it safe to compile numpy with gcc 'strict aliasing'?
No! And depending on the compiler version you might find whole bits of code
disappearing during optimization without warning, yielding fantastic
benchmarks but questionable results. The linux kernel won't compile
correctly with that flag either, and it has been a longstanding cause of
contention with gnu that it is the default. If you search the mailing lists
you can find Linus making some nasty comments about it.
As far as I can tell, strict aliasing assumes that pointers are only cast
between types of the same length. This is a problem in code that casts
pointers with abandon between all types.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion