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
f
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
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-
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
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