d01b425e5d
Clang since r369414 (clang-10) can now check -Wimplicit-fallthrough for C code, and use the GNU C style attribute to denote fallthrough. Move the test from header only to autoconf. The previous test used brittle version detection which did not work for newer clang that supported this feature. The attribute has to be its own statement, hence the added `;`. It also can only precede case statements, so the final cases should be explicitly terminated with break statements. Fixes commit3d29d11ac2
("Clean compilation -Wextra") Link:1e0affb6e5
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
52 lines
1.3 KiB
C
52 lines
1.3 KiB
C
/* Defined if __attribute__((...)) syntax is supported. */
|
|
#undef JEMALLOC_HAVE_ATTR
|
|
|
|
/* Defined if alloc_size attribute is supported. */
|
|
#undef JEMALLOC_HAVE_ATTR_ALLOC_SIZE
|
|
|
|
/* Defined if format_arg(...) attribute is supported. */
|
|
#undef JEMALLOC_HAVE_ATTR_FORMAT_ARG
|
|
|
|
/* Defined if format(gnu_printf, ...) attribute is supported. */
|
|
#undef JEMALLOC_HAVE_ATTR_FORMAT_GNU_PRINTF
|
|
|
|
/* Defined if format(printf, ...) attribute is supported. */
|
|
#undef JEMALLOC_HAVE_ATTR_FORMAT_PRINTF
|
|
|
|
/* Defined if fallthrough attribute is supported. */
|
|
#undef JEMALLOC_HAVE_ATTR_FALLTHROUGH
|
|
|
|
/*
|
|
* Define overrides for non-standard allocator-related functions if they are
|
|
* present on the system.
|
|
*/
|
|
#undef JEMALLOC_OVERRIDE_MEMALIGN
|
|
#undef JEMALLOC_OVERRIDE_VALLOC
|
|
|
|
/*
|
|
* At least Linux omits the "const" in:
|
|
*
|
|
* size_t malloc_usable_size(const void *ptr);
|
|
*
|
|
* Match the operating system's prototype.
|
|
*/
|
|
#undef JEMALLOC_USABLE_SIZE_CONST
|
|
|
|
/*
|
|
* If defined, specify throw() for the public function prototypes when compiling
|
|
* with C++. The only justification for this is to match the prototypes that
|
|
* glibc defines.
|
|
*/
|
|
#undef JEMALLOC_USE_CXX_THROW
|
|
|
|
#ifdef _MSC_VER
|
|
# ifdef _WIN64
|
|
# define LG_SIZEOF_PTR_WIN 3
|
|
# else
|
|
# define LG_SIZEOF_PTR_WIN 2
|
|
# endif
|
|
#endif
|
|
|
|
/* sizeof(void *) == 2^LG_SIZEOF_PTR. */
|
|
#undef LG_SIZEOF_PTR
|