[Bug c++/96742] [10/11 Regression] "warning: comparison of unsigned expression in ‘< 0’ is always false" with dependent values

2020-10-28 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96742 --- Comment #8 from CVS Commits --- The master branch has been updated by Marek Polacek : https://gcc.gnu.org/g:976e7ef1a2d54f46021f74d071d9fdb9631298f8 commit r11-4501-g976e7ef1a2d54f46021f74d071d9fdb9631298f8 Author: Marek Polacek Date:

[Bug c++/96742] [10/11 Regression] "warning: comparison of unsigned expression in ‘< 0’ is always false" with dependent values

2020-10-23 Thread hanicka at hanicka dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96742 Hana Dusíková changed: What|Removed |Added CC||hanicka at hanicka dot net --- Comment

[Bug c++/96742] [10/11 Regression] "warning: comparison of unsigned expression in ‘< 0’ is always false" with dependent values

2020-10-23 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96742 Marek Polacek changed: What|Removed |Added CC||erenon2 at gmail dot com --- Comment #6

[Bug c++/96742] [10/11 Regression] "warning: comparison of unsigned expression in ‘< 0’ is always false" with dependent values

2020-10-23 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96742 --- Comment #5 from Jonathan Wakely --- Oh and since C++17 you can do: if constexpr (N != 0) for (size_t i = 0; i < N; ++i) { ret += i * x[i]; } but it still shouldn't be necessary :-)

[Bug c++/96742] [10/11 Regression] "warning: comparison of unsigned expression in ‘< 0’ is always false" with dependent values

2020-10-23 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96742 --- Comment #4 from Jonathan Wakely --- (In reply to William Throwe from comment #2) > This warns if passed an array of length 0 because the for-loop condition is > always false. Any change I can make to fix it seems to make the code worse. > I

[Bug c++/96742] [10/11 Regression] "warning: comparison of unsigned expression in ‘< 0’ is always false" with dependent values

2020-10-12 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96742 Richard Biener changed: What|Removed |Added Priority|P3 |P2

[Bug c++/96742] [10/11 Regression] "warning: comparison of unsigned expression in ‘< 0’ is always false" with dependent values

2020-08-24 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96742 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed|