[Bug c++/103618] constexpr std::reverse produces strict-overflow warning
maik.urbannek at cattatech dot de
gcc-bugzilla@gcc.gnu.org
Wed Dec 8 19:46:59 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103618
--- Comment #3 from Maik Urbannek <maik.urbannek at cattatech dot de> ---
The `constexpr` in the main function is not necessary to produce the warning.
The Function foo has to be constexpr. 'inline' or 'static' (before the
function) does not produce the warning.
Maybe `constexpr` functions have better optimization and in one of the
optimizations happens unwanted stuff.
I don't think it is an compile-time/run-time issue.
More information about the Gcc-bugs
mailing list