[issue9190] Undefined behaviour in _PyFloat_Pack4

2010-08-04 Thread Mark Dickinson
Changes by Mark Dickinson : -- resolution: -> wont fix status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue9190] Undefined behaviour in _PyFloat_Pack4

2010-08-04 Thread Mark Dickinson
Mark Dickinson added the comment: Closing this as not worth worrying about. This *is* undefined behaviour, but it really doesn't seem to be a problem in practice. (It might have been better for the C standard to describe this as merely implementation-defined.) -- __

[issue9190] Undefined behaviour in _PyFloat_Pack4

2010-07-07 Thread Mark Dickinson
New submission from Mark Dickinson : _PyFloat_Pack4 does a double-to-float cast, without first checking that the value being converted is within the range of a float. According to C99 6.3.1.5p2, this results in undefined behaviour. It should be fixed (probably via comparison with FLT_MAX bef