https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109581
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- This is certainly not new behavior in GCC, value range propagation handling floating point is new, but GCC has always for -ffinite-math-only assumed infinities and NaNs don't appear in many places. There is no place to emit the warning you'd like to see, the ranges simply don't include infinities and NaNs when command line options promise they won't appear, when actually folding the comparison the compiler doesn't really know why the range is the way it is, whether it is from the above option, or just because the code is guarded with if (!__builtin_isinf (x)) or any other way how to assert why in a particular code path infinity can't appear.