[Bug c/92507] False positives with -Wsign-compare

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Nov 14 11:42:00 GMT 2019


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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So there are two things here.  First -Wsign-compare does not understand flow
control at all so it only looks at the statement/expression at hand (i < n). 
Second n is not a constant integer expression in C (It is in C++ but that is a
different langauge).


More information about the Gcc-bugs mailing list