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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Note, it is no longer implementation-defined behavior in C++20, but well
defined:

"Otherwise, the result is the unique value of the destination type that is
congruent to the source integer modulo 2^N, where N is the range exponent of
the destination type.", see wg21.link/p1236 .  It wouldn't surprise me if next
C standard changes similarly.

Reply via email to