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

--- Comment #5 from joseph at codesourcery dot com <joseph at codesourcery dot 
com> ---
On Wed, 21 Mar 2018, antoshkka at gmail dot com wrote:

> unsigned test02(unsigned lhs) {
>     return lhs + 2.0; // No signed overflow
> }

If lhs is UINT_MAX or UINT_MAX - 1, the conversion from double to unsigned 
should raise FE_INVALID, i.e. optimizing to integer addition is only valid 
for -fno-trapping-math.

Reply via email to