[PATCH] D121853: [scudo][NFC] Suppress warnings for missing-noreturn, conditional-uninitialized, zero-length-array

Roland McGrath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 29 17:39:42 PDT 2022


mcgrathr added inline comments.


================
Comment at: compiler-rt/lib/scudo/standalone/memtag.h:304
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wmissing-noreturn"
----------------
abrachet wrote:
> These need to be wrapped in `#if __clang__`. This doesn't build with gcc + `-Werror=unknown-pragmas`
For warning switches that GCC also has, you should instead be using `#pragma GCC diagnostic ...`.
Clang's feature is the same as GCC's, and Clang also supports the GCC syntax (which predates the Clang-specific pragma AFAIK).  `-Wmissing-noreturn` is a warning switch both compilers have and that works the same in both.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121853



More information about the llvm-commits mailing list