[Bug c++/120990] Narrowing conversion in std::function return value is not reported

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jul 8 00:46:43 GMT 2025


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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>Interestingly, if I try this on ARM 32-bit GCC 15.1, it does report:


That is because long is 32bit so there is a warning at the function definition
rather than at the function call point.


More information about the Gcc-bugs mailing list