https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94981

--- Comment #7 from Tony Reix <tony.reix at atos dot net> ---
(In reply to Andreas Schwab from comment #1)
> Converting a negative float to an unsigned integer is undefined.

http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf says (page 43):
If the value of the integral part cannot be represented by the integer type,
the behavior is undefined.50)
50) The remaindering operation performed when a value of integer type is
converted to unsigned type need not be performed when a value of real floating
type is converted to unsigned type. Thus, the range of portable real floating
values is (−1, Utype_MAX+1).

Hummmmmmm

Reply via email to