SQLite

Check-in [fc248a4a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Rework the deliberate_fall_through macro along the lines suggested by forum post 7ec11023dd so that it works better with LLVM, while preserving compatibility with MSVC and older GCCs.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: fc248a4a0a232a95a79e24e57faedb5d824c3bf0aa62054b72339257dc9c18b3
User & Date: drh 2024-07-02 12:16:29
Original Comment: Reword the deliberate_fall_through macro along the lines suggested by forum post 7ec11023dd so that it works better with LLVM, while preserving compatibility with MSVC and older GCCs.
Context
2024-07-02
13:54
Add assert() statements to FTS5 to hush-up warnings from scan-build. (check-in: 77a76654 user: drh tags: trunk)
12:16
Rework the deliberate_fall_through macro along the lines suggested by forum post 7ec11023dd so that it works better with LLVM, while preserving compatibility with MSVC and older GCCs. (check-in: fc248a4a user: drh tags: trunk)
11:30
In the CLI, if the XDG_CONFIG_HOME environment variable is not set, then also search in ~/.config/sqlite3/sqliterc for the initialization file. See forum thread 5cc6d059e9e092ed. (check-in: 33841c9c user: drh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/sqliteInt.h.

139
140
141
142
143
144
145
146

147

148

149
150
151
152
153
154
155
156
#if defined(__OpenBSD__) && !defined(_BSD_SOURCE)
# define _BSD_SOURCE
#endif

/*
** 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
#endif

/*
** For MinGW, check to see if we can include the header file containing its
** version information, among other things.  Normally, this internal MinGW
** header file would [only] be included automatically by other MinGW header
** files; however, the contained version information is now required by this







|
>
|
>
|
>
|







139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
#if defined(__OpenBSD__) && !defined(_BSD_SOURCE)
# define _BSD_SOURCE
#endif

/*
** Macro to disable warnings about missing "break" at the end of a "case".
*/
#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

/*
** For MinGW, check to see if we can include the header file containing its
** version information, among other things.  Normally, this internal MinGW
** header file would [only] be included automatically by other MinGW header
** files; however, the contained version information is now required by this