https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44677
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2010-06-28 00:34:58 |2020-5-19 --- Comment #10 from Martin Sebor <msebor at gcc dot gnu.org> --- See pr95217 for other cases to handle (-Wunused-but-set-parameter). For the test case there, Clang's static analyzer diagnoses two out of the four cases: $ cat pr95217.c && clang -S -Wall -Wextra --analyze pr95217.c void f0 (int *p) { p = 0; // -Wunused-but-set-parameter (expected) } void f1 (int *p) { p += 1; // missing warning } void f2 (int *p) { p = p + 1; // missing warning } void f3 (int *p) { ++p; // missing warning } pr95217.c:8:3: warning: Value stored to 'p' is never read p += 1; // missing warning ^ ~ pr95217.c:13:3: warning: Value stored to 'p' is never read p = p + 1; // missing warning ^ ~~~~~ 2 warnings generated.