summaryrefslogtreecommitdiff
path: root/m4/labels-as-values.m4
diff options
context:
space:
mode:
authorMichael Gran <spk121@yahoo.com>2022-10-08 05:28:06 -0700
committerMike Gran <spk121@yahoo.com>2022-10-14 08:40:23 -0700
commit2b73ef4deb7df9e42fd776f1ab334540d047af7d (patch)
treebce9f2e0e1a45754bb977ca54e75ccb04b97155b /m4/labels-as-values.m4
parente9db8a29e472e2c0899344394dd9cf471e9ed514 (diff)
downloadguile-2b73ef4deb7df9e42fd776f1ab334540d047af7d.tar.gz
Modernizes labels-as-values.m4
labels-as-values.m4 uses deprecated AC_TRY_COMPILE and has a K&R-type C function declaration * m4/labels-as-values.m4: updated
Diffstat (limited to 'm4/labels-as-values.m4')
-rw-r--r--m4/labels-as-values.m413
1 files changed, 6 insertions, 7 deletions
diff --git a/m4/labels-as-values.m4 b/m4/labels-as-values.m4
index 3cf7320bd..e01768f00 100644
--- a/m4/labels-as-values.m4
+++ b/m4/labels-as-values.m4
@@ -1,19 +1,18 @@
dnl check for gcc's "labels as values" feature
AC_DEFUN([AC_C_LABELS_AS_VALUES],
[AC_CACHE_CHECK([labels as values], ac_cv_labels_as_values,
-[AC_TRY_COMPILE([
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
int foo(int);
-int foo(i)
-int i; {
+int foo(int i) {
static void *label[] = { &&l1, &&l2 };
goto *label[i];
l1: return 1;
l2: return 2;
}
-],
-[int i;],
-ac_cv_labels_as_values=yes,
-ac_cv_labels_as_values=no)])
+]],
+[[foo(1);]])],
+[ac_cv_labels_as_values=yes],
+[ac_cv_labels_as_values=no])])
if test "$ac_cv_labels_as_values" = yes; then
AC_DEFINE([HAVE_LABELS_AS_VALUES], [],
[Define if compiler supports gcc's "labels as values" (aka computed goto)