[Bug c/87950] GCC warns about reaching end of non-void function when all switch cases are completely handled
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Nov 9 04:41:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87950
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Vitali from comment #6)
> Actually as of C++17 it's undefined behaviour.
>
> http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1766
>
> so at the very least when compiled with C++17 the compiler should be smart
> enough to strengthen the control flow analysis.
Open a C++ bug then rather than reusing a C bug report ...
More information about the Gcc-bugs
mailing list