[issue30124] Fix C aliasing issue in Python/dtoa.c to use strict aliasing on Clang 4.0

2017-04-25 Thread Dimitry Andric
Dimitry Andric added the comment: STINNER Victor writes: > Would it be technically possible to completely get ride of the union? Probably, it's just more work, and it has to be done pretty carefully to avoid regressions. It seems Python already does some exercising of these dtoa functi

[issue30124] Fix C aliasing issue in Python/dtoa.c to use strict aliasing on Clang 4.0

2017-04-24 Thread Dimitry Andric
Dimitry Andric added the comment: There is a "#pragma clang optimize", but it only has the options "on" or "off", for specific source locations. I guess that would defeat the purpose a little bit. :( As an experiment, and to show what would be needed (at minim

[issue30124] Fix C aliasing issue in Python/dtoa.c to use strict aliasing on Clang 4.0

2017-04-24 Thread Dimitry Andric
Dimitry Andric added the comment: Note that gcc has documented accessing union members in this way as an "implementation defined" feature: https://gcc.gnu.org/onlinedocs/gcc/Structures-unions-enumerations-and-bit-fields-implementation.html#Structures-unions-enumerations-and-

[issue30104] Float rounding errors on AMD64 FreeBSD CURRENT Debug 3.x buildbot

2017-04-20 Thread Dimitry Andric
Dimitry Andric added the comment: This is most likely the same issue we found in https://bugs.freebsd.org/216770, which was reported upstream to LLVM here: https://bugs.llvm.org//show_bug.cgi?id=31928, and resulted in a very long and not really productive discussion about whether type punning

[issue10910] pyport.h FreeBSD/Mac OS X "fix" causes errors in C++ compilation

2016-04-03 Thread Dimitry Andric
Dimitry Andric added the comment: I am a FreeBSD committer, and I recently ran into this issue too, since I am working on an update of libc++ in the FreeBSD base system. As part of this work, we attempt to recompile all ports with the proposed change (see [1]). During such a recompile, we