[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

Stephan Bergmann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 3 03:59:04 PDT 2021


sberg added a comment.

Is it intentional that this warns about volatile variables as in

  void f(char * p) {
      volatile char c = 0;
      c ^= *p;
  }

(I see that GCC warns about volatile too, at least when you replace the `^=` with `=`, so assume the answer is "yes", but would just like to see that confirmed (ideally with a test case even?).)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100581/new/

https://reviews.llvm.org/D100581



More information about the cfe-commits mailing list