https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104746
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |NEW Resolution|WONTFIX |--- --- Comment #11 from Martin Liška <marxin at gcc dot gnu.org> --- (In reply to Martin Sebor from comment #9) > Martin, since the warning is working correctly (even if it's arguably not as > clear as it could be), I'd like us to close this. If you agree, can you > please go ahead and mark this as resolved (either invalid or wontfix)? All right, so I changed my mind. The warning is maybe working according to documentation, but I think the constraints it assumes are basically wrong. If it's unclear about a range of an expression, then it should not emit a warning based on that. Such types of warnings should be part of the static analyzer, where the level of certainty is lower. Leaving the issue here for future improvement.