diff options
author | Brian Behlendorf <[email protected]> | 2022-06-20 19:53:58 +0000 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2022-06-27 14:18:50 -0700 |
commit | a6e8113fed8a508ffda13cf1c4d8da99a4e8133a (patch) | |
tree | b3a6307a3587fac8a864deb57b4e1c6fb4d08254 /config/always-compiler-options.m4 | |
parent | 80a650b7bb04bce3aef5e4cfd1d966e3599dafd4 (diff) |
Silence -Winfinite-recursion warning in luaD_throw()
This code should be kept inline with the upstream lua version as much
as possible. Therefore, we simply want to silence the warning. This
check was enabled by default as part of -Wall in gcc 12.1.
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #13528
Closes #13575
Diffstat (limited to 'config/always-compiler-options.m4')
-rw-r--r-- | config/always-compiler-options.m4 | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/config/always-compiler-options.m4 b/config/always-compiler-options.m4 index 8cfd27535..a67319691 100644 --- a/config/always-compiler-options.m4 +++ b/config/always-compiler-options.m4 @@ -205,6 +205,29 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_IMPLICIT_FALLTHROUGH], [ ]) dnl # +dnl # Check if cc supports -Winfinite-recursion option. +dnl # +AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_INFINITE_RECURSION], [ + AC_MSG_CHECKING([whether $CC supports -Winfinite-recursion]) + + saved_flags="$CFLAGS" + CFLAGS="$CFLAGS -Werror -Winfinite-recursion" + + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [ + INFINITE_RECURSION=-Winfinite-recursion + AC_DEFINE([HAVE_INFINITE_RECURSION], 1, + [Define if compiler supports -Winfinite-recursion]) + AC_MSG_RESULT([yes]) + ], [ + INFINITE_RECURSION= + AC_MSG_RESULT([no]) + ]) + + CFLAGS="$saved_flags" + AC_SUBST([INFINITE_RECURSION]) +]) + +dnl # dnl # Check if cc supports -fno-omit-frame-pointer option. dnl # AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_OMIT_FRAME_POINTER], [ |