https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119014
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- That is the normal behavior of extended precision. Because without -fexcess-precision=16 _Float16 is evaluated in float precision, the first 42.42f16 is actually 42.42f returned in _Float16 and thus converted to the _Float16 precision, while in the x != 42.42f16 case there is no explicit cast or assignment and so you're actually comparing against 42.42f. You can use x != (_Float16) 42.42f16 if the constant is supposed to be in _Float16 precision.