aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2024-08-09 15:34:53 +0200
committerFlorian Weimer <fweimer@redhat.com>2024-08-09 15:34:53 +0200
commit4331769c0fd522045ab6b30e0ea5dff59ec73019 (patch)
tree5a024f1868a637f95bb1683b439c964a0f4e01fa /configure
parent5662433c38c1925bd937cd50232fe4251bc20d04 (diff)
downloadglibc-4331769c0fd522045ab6b30e0ea5dff59ec73019.tar.xz
glibc-4331769c0fd522045ab6b30e0ea5dff59ec73019.zip
Turn on -Wimplicit-fallthrough by default if available
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure26
1 files changed, 26 insertions, 0 deletions
diff --git a/configure b/configure
index 1d543548cd..ec0b62db36 100755
--- a/configure
+++ b/configure
@@ -7465,6 +7465,32 @@ if test $libc_cv_cc_loop_to_function = yes; then
fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wimplicit-fallthrough" >&5
+printf %s "checking for -Wimplicit-fallthrough... " >&6; }
+if test ${libc_cv_cc_wimplicit_fallthrough+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) if { ac_try='${CC-cc} -Werror -Wimplicit-fallthrough -xc /dev/null -S -o /dev/null'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+then :
+ libc_cv_cc_wimplicit_fallthrough=-Wimplicit-fallthrough
+else case e in #(
+ e) libc_cv_cc_wimplicit_fallthrough= ;;
+esac
+fi
+ ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_wimplicit_fallthrough" >&5
+printf "%s\n" "$libc_cv_cc_wimplicit_fallthrough" >&6; }
+config_vars="$config_vars
+cc-option-wimplicit-fallthrough = $libc_cv_cc_wimplicit_fallthrough"
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libgd" >&5
printf %s "checking for libgd... " >&6; }
if test "$with_gd" != "no"; then