diff --git a/CMakeLists.txt b/CMakeLists.txt index ca2ce3e3..403251cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -172,6 +172,9 @@ if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang|GNU") if(CMAKE_C_COMPILER_ID MATCHES "GNU") list(APPEND mi_cflags -Wno-invalid-memory-model) endif() + if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang") + list(APPEND mi_cflags -Wpedantic -Wno-static-in-inline) + endif() endif() if(CMAKE_C_COMPILER_ID MATCHES "Intel") diff --git a/src/alloc-override.c b/src/alloc-override.c index 48fc33bb..084f8ae4 100644 --- a/src/alloc-override.c +++ b/src/alloc-override.c @@ -137,7 +137,7 @@ terms of the MIT license. A copy of the license can be found in the file void _ZdlPvmSt11align_val_t(void* p, size_t n, size_t al) { mi_free_size_aligned(p,n,al); } void _ZdaPvmSt11align_val_t(void* p, size_t n, size_t al) { mi_free_size_aligned(p,n,al); } - typedef struct mi_nothrow_s { } mi_nothrow_t; + typedef struct mi_nothrow_s { int _tag; } mi_nothrow_t; #if (MI_INTPTR_SIZE==8) void* _Znwm(size_t n) MI_FORWARD1(mi_new,n); // new 64-bit void* _Znam(size_t n) MI_FORWARD1(mi_new,n); // new[] 64-bit diff --git a/src/alloc.c b/src/alloc.c index 25cc04ef..8acff783 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -557,6 +557,7 @@ void* _mi_externs[] = { (void*)&_mi_page_malloc, (void*)&mi_malloc, (void*)&mi_malloc_small, + (void*)&mi_zalloc_small, (void*)&mi_heap_malloc, (void*)&mi_heap_zalloc, (void*)&mi_heap_malloc_small