[Bug c++/123361] False positive "narrowing conversion of 'value' from 'int32_t' {aka 'int'} to 'double'"?
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 1 22:28:37 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123361
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
GCC is correct and in good company with EDG, clang and MSVC all producing a
narrowing conversion error or warning. clang diagonstic is maybe the best:
<source>:7:20: error: non-constant-expression cannot be narrowed from type
'int' to 'double' in initializer list [-Wc++11-narrowing]
More information about the Gcc-bugs
mailing list