[Numpy-discussion] Ia `-fno-strict-aliasing` still required?

Charles R Harris charlesr.harris at gmail.com
Fri Jan 4 16:25:12 EST 2019


On Fri, Jan 4, 2019 at 1:14 PM Nathaniel Smith <njs at pobox.com> wrote:

> This is a pretty good article on what -fno-strict-aliasing actually does:
> https://blog.regehr.org/archives/1307
>
>
That was pretty much as I recalled. I'm guessing that what changed for
NumPy was going to separate compilation and the wide use of `char *`. All
in all, it looks like we have been lucky and should  continue compiling
with `-fno-strict-aliasing`, it will probably not affect the speed
much. Perhaps what I am missing is looking for compiler warnings rather
than errors...

AFAICT, MSVC doesn't implement strict aliasing, so no worry there (yet).

The gcc manual doesn't say much about `-fno-strict-aliasing`, just

... -fno-strict-aliasing are passed through to the link stage and merged
conservatively for conflicting translation units

But I am going to assume that it also turns off `-fstrict-aliasing`.

<snip>

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20190104/93956110/attachment.html>


More information about the NumPy-Discussion mailing list