Kristján Valur Jónsson <krist...@ccpgames.com> added the comment: return *(PY_LONG_LONG*)&fval == 0; There is no aliasing, because there are no pointer variables in existence. If we did this:
double *pfval = &fval; PY_LONG_LONG *pl = (PY_LONG_LONG*)pfval return *pfval == 0 Then we would have aliasing. Because "pfval" in this example doesn't exist but is merely a temporary, there is no aliasing. As for IEEE compatibility, I don't think we could have our own floating point formatting library if we didn't make that assumption, but I might be wrong about that. On the other hand, I don't think there is a supported python architecture that defines positive zero as anything else than bitwise zero. And should such a platform be found, it is easy enough to disable this code for it. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14381> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com