From 39863eb7845cc301da0dad68d1c9dbcf1b07aaf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20K=C3=B6lsch?= Date: Tue, 11 Oct 2022 10:26:05 +0200 Subject: [PATCH] Disable fallthrough warnings for clang compiler --- exprtk.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/exprtk.hpp b/exprtk.hpp index 4a4db54..5238551 100644 --- a/exprtk.hpp +++ b/exprtk.hpp @@ -77,6 +77,15 @@ namespace exprtk #define exprtk_disable_fallthrough_end \ _Pragma ("GCC diagnostic pop") \ + #elif defined(__clang__) + + #define exprtk_disable_fallthrough_begin \ + _Pragma ("clang diagnostic push") \ + _Pragma ("clang diagnostic ignored \"-Wimplicit-fallthrough\"") \ + + #define exprtk_disable_fallthrough_end \ + _Pragma ("clang diagnostic pop") \ + #else #define exprtk_disable_fallthrough_begin (void)0; #define exprtk_disable_fallthrough_end (void)0;