Merge pull request #10074 from lf-/jade/ban-implicit-fallthrough

Warn on implicit switch case fallthrough

(cherry picked from commit 21282c3c204597641402c6bcff8fc9ee7bc31fa1)
Change-Id: I5ebbdfb6c037d2c55254f37dd391c07c2ce7443e
This commit is contained in:
eldritch horrors
2024-03-07 00:11:12 -07:00
parent 0d9a043f43
commit 1342c8f18e
3 changed files with 9 additions and 1 deletions
+6
View File
@@ -20,6 +20,12 @@
#pragma clang diagnostic ignored "-Wunneeded-internal-declaration"
#endif
// yacc generates code that uses unannotated fallthrough.
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#ifdef __clang__
#pragma clang diagnostic ignored "-Wimplicit-fallthrough"
#endif
#include <boost/lexical_cast.hpp>
#include "nixexpr.hh"