1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-01-06 08:01:16 +03:00

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
This commit is contained in:
drh
2024-07-02 12:16:29 +00:00
parent 2143714d9f
commit 8960c02b91
3 changed files with 14 additions and 11 deletions

View File

@@ -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
/*