Skip to content

Commit

Permalink
Ignore unknown pragmas
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
azat committed Nov 12, 2022
1 parent 72a4fe7 commit 9e34693
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ if (${GNUC})

# Disable unused-function warnings. These trigger for minheap-internal.h.
-Wno-unused-function

-Wno-pragmas
)

if (${CLANG})
Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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*)
Expand Down

0 comments on commit 9e34693

Please sign in to comment.