aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-03-07 07:12:20 +0100
committereldritch horrors <pennae@lix.systems>2024-03-07 00:11:12 -0700
commit1342c8f18e48afd1577cfdc319c254ce7c42637e (patch)
treec054031cab85d1973000e1f153a6ff6b1874f2e6 /src
parent0d9a043f4365100c5b451b6476edb2b9ab09e19b (diff)
Merge pull request #10074 from lf-/jade/ban-implicit-fallthrough
Warn on implicit switch case fallthrough (cherry picked from commit 21282c3c204597641402c6bcff8fc9ee7bc31fa1) Change-Id: I5ebbdfb6c037d2c55254f37dd391c07c2ce7443e
Diffstat (limited to 'src')
-rw-r--r--src/libexpr/lexer.l6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libexpr/lexer.l b/src/libexpr/lexer.l
index df2cbd06f..ced1c4c39 100644
--- a/src/libexpr/lexer.l
+++ b/src/libexpr/lexer.l
@@ -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"