Ignore unknown pragmas

Since new compilers has new checks (like -Wdangling-pointer), and so to
avoid extra checks in cmake/autotools, simply suppress if the pragma is
unknown.
This commit is contained in:
Azat Khuzhin 2022-11-12 18:56:25 +01:00
parent 72a4fe76fc
commit 9e346936d4
2 changed files with 5 additions and 0 deletions

View File

@ -317,6 +317,8 @@ if (${GNUC})
# Disable unused-function warnings. These trigger for minheap-internal.h.
-Wno-unused-function
-Wno-pragmas
)
if (${CLANG})

View File

@ -772,6 +772,9 @@ if test "$enable_gcc_warnings" != "no" && test "$GCC" = "yes"; then
dnl Disable unused-function warnings. These trigger for minheap-internal.h.
AX_CHECK_COMPILE_FLAG([-Wno-unused-function], [CFLAGS="$CFLAGS -Wno-unused-function"],[],[-Werror])
dnl Disable unknown pragmas warnings.
AX_CHECK_COMPILE_FLAG([-Wno-pragmas], [CFLAGS="$CFLAGS -Wno-pragmas"],[],[-Werror])
if test "$have_clang" = "yes"; then
case "$host_os" in
darwin*)