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

--- Comment #4 from South Window <make_...@t-online.de> ---
For the user of GCC it doesn't matter whether GCC at compile times converts the
literal to a double, and then notices that 32 bits of are zero, and uses a
float instead, or if GCC knows right away that 0.5 (and others) don't need to
be promoted.

Promoting first and then completely undoing the promotion is a purely internal
process, effectively a null operation that is of no interest of the user of the
compiler.

One of the most relevant scopes for -Wdouble-promotion is probably optimization
(in particular for SIMD), where the unintended use of a double would cause a
significant performance hit. 
But if the compiler is smart enough and is not using doubles and double
instructions, and no precision is changed anywhere in the process, it should be
smart enough to not through a this warning.

Reply via email to