Alfred Agrell (@Alcaro) commented about dlls/cabinet/liblzx_compiler.h:
+/* Optional definitions for checking with 'sparse'. */ +#ifdef __CHECKER__ +# define _bitwise_attr __attribute__((bitwise)) +# define _force_attr __attribute__((force)) +#else +# define _bitwise_attr +# define _force_attr +#endif
+/* STATIC_ASSERT() - verify the truth of an expression at compilation time. */ +#ifdef __CHECKER__ +#define STATIC_ASSERT(expr) +#define STATIC_ASSERT_STMT(expr) +#elif __STDC_VERSION__ >= 201112L +# define STATIC_ASSERT(expr) _Static_assert((expr), "") +# define STATIC_ASSERT_STMT(expr) ({_Static_assert((expr), "");})
That's not valid C. https://godbolt.org/z/f33Gar68P
(MSVC defaults to not defining __STDC_VERSION__, and GCC and Clang default to permitting that GCC extension with no warning.)
IMO the correct fix is either moving them to just after the declaration section, or simply using the sizeof version for everything.
Though I will admit the relevant warnings look like compiler bugs. I'll go file bug reports.