https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97544

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
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 this warning.

G++ used to have loads of these warnings in templates, and most of them have
been suppressed because we've usually decided that it's not helpful to warn
about template code where some instantiations result in "always true"
comparisons.

Reply via email to