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

--- Comment #6 from Florian Weimer <fw at gcc dot gnu.org> ---
(In reply to Eric Gallager from comment #5)
> This is one of the reasons -Wfloat-conversion exists: 
> 
> $ gcc -c -Wall -Wextra -Wfloat-conversion -Wdouble-promotion
> -Wunsuffixed-float-constants -pedantic -O2 88892.c
> 88892.c: In function 'f':
> 88892.c:4:13: warning: conversion from 'double' to 'float' may change value
> [-Wfloat-conversion]
>    float f = d;
>              ^
> $

Rounding is expected, but GCC does not use the right rounding mode.

Reply via email to