aboutsummaryrefslogtreecommitdiff
path: root/src/sqliteInt.h
diff options
context:
space:
mode:
authordrh <>2024-07-02 12:16:29 +0000
committerdrh <>2024-07-02 12:16:29 +0000
commit8960c02b916e08aab29fe4ed9fd48ee0d50ded35 (patch)
tree2e312effdc9d7bf206f76fa08fe209cf1ee2c5ed /src/sqliteInt.h
parent2143714d9fdaa8301c4fd6c6838980ffffa90d23 (diff)
downloadsqlite-8960c02b916e08aab29fe4ed9fd48ee0d50ded35.tar.gz
sqlite-8960c02b916e08aab29fe4ed9fd48ee0d50ded35.zip
Reword the deliberate_fall_through macro along the lines suggested by
[forum:/forumpost/7ec11023dd|forum post 7ec11023dd] so that it works better with LLVM, while preserving compatibility with MSVC and older GCCs. FossilOrigin-Name: fc248a4a0a232a95a79e24e57faedb5d824c3bf0aa62054b72339257dc9c18b3
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r--src/sqliteInt.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index 736889868..fd9faf6b4 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -143,10 +143,13 @@
/*
** Macro to disable warnings about missing "break" at the end of a "case".
*/
-#if GCC_VERSION>=7000000
-# define deliberate_fall_through __attribute__((fallthrough));
-#else
-# define deliberate_fall_through
+#if defined(__has_attribute)
+# if __has_attribute(fallthrough)
+# define deliberate_fall_through __attribute__((fallthrough));
+# endif
+#endif
+#if !defined(deliberate_fall_through)
+# define deliberate_fall_through
#endif
/*