https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61867
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu.org
Severity|normal |enhancement
--- Comment #2 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
There are many cases where this may trigger false positives. The mask used in
the assignment or the value used in the comparison may come from a macro
expansion, and be compile-time dependent. Or the comparison may be some kind of
debug/assert check to ensure people don't mess up the assignment.
Does cppcheck document what is actually warned and what is not and how to
work-around the warning in case the code is actually valid?
I am sure cppcheck warns about a lot of things that GCC does not, but the
difficulty lies in getting the corner-cases right and the right level of
warning versus annoying users.