[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 10/13: Modernizes labels-as-values.m4
From: |
Mike Gran |
Subject: |
[Guile-commits] 10/13: Modernizes labels-as-values.m4 |
Date: |
Sat, 8 Oct 2022 11:26:51 -0400 (EDT) |
mike121 pushed a commit to branch wip-modernize-autotools
in repository guile.
commit 52ea50e9c60d1cf5523b8321979f183ff59a62aa
Author: Michael Gran <spk121@yahoo.com>
AuthorDate: Sat Oct 8 05:28:06 2022 -0700
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
---
m4/labels-as-values.m4 | 13 ++++++-------
1 file 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)
- [Guile-commits] branch wip-modernize-autotools updated (eb9e547e6 -> 0bebd7a32), Mike Gran, 2022/10/08
- [Guile-commits] 08/13: Presume time.h and sys/time.h don't conflict when included, Mike Gran, 2022/10/08
- [Guile-commits] 10/13: Modernizes labels-as-values.m4,
Mike Gran <=
- [Guile-commits] 07/13: Presume ISO C90 functions are always available, Mike Gran, 2022/10/08
- [Guile-commits] 13/13: Adds automake option for subdirs, Mike Gran, 2022/10/08
- [Guile-commits] 01/13: Update libtool initialization in configure script, Mike Gran, 2022/10/08
- [Guile-commits] 04/13: Remove obsolete macro AM_PROG_CC_C_O in configure script, Mike Gran, 2022/10/08
- [Guile-commits] 05/13: Remove AC_HEADER_STDC from configure.ac, Mike Gran, 2022/10/08
- [Guile-commits] 06/13: Presume ISO C90 headers are always available, Mike Gran, 2022/10/08
- [Guile-commits] 09/13: Remove special logic for the obscure CMU C library's libc.h, Mike Gran, 2022/10/08
- [Guile-commits] 11/13: Presumes signal handler return void, Mike Gran, 2022/10/08
- [Guile-commits] 12/13: autoupdate acinclude.m4, Mike Gran, 2022/10/08
- [Guile-commits] 03/13: Use autoconf's ability to choose the latest version of C, Mike Gran, 2022/10/08