[Bug c++/103618] constexpr std::reverse produces strict-overflow warning

2021-12-08 Thread maik.urbannek at cattatech dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103618 --- Comment #3 from Maik Urbannek --- 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 `constexp

[Bug c++/103618] constexpr std::reverse produces strict-overflow warning

2021-12-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103618 --- Comment #2 from Jonathan Wakely --- This is a strange one. If that overflow happened during constant evaluation, it would be ill-formed. And none of the lines mentioned in the diagnostics have any pointer arithmetic at all.

[Bug c++/103618] constexpr std::reverse produces strict-overflow warning

2021-12-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103618 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|