[Bug c++/97544] -Wtype-limits triggered for comparison to template argument

2020-10-23 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97544 Marek Polacek changed: What|Removed |Added Resolution|--- |DUPLICATE

[Bug c++/97544] -Wtype-limits triggered for comparison to template argument

2020-10-23 Thread erenon2 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97544 --- Comment #4 from Benedek Thaler --- FTR, Using (N != 0 && i < N) does not silence the warning. https://gcc.godbolt.org/z/WqaT3G

[Bug c++/97544] -Wtype-limits triggered for comparison to template argument

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

[Bug c++/97544] -Wtype-limits triggered for comparison to template argument

2020-10-23 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97544 --- Comment #2 from Jonathan Wakely --- It's right, but it's not helpful. There are other instantiations of the template where the condition isn't always true, and users shouldn't have to write the condition as (N != 0 && i < N) just to silence

[Bug c++/97544] -Wtype-limits triggered for comparison to template argument

2020-10-23 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97544 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #1