1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00
guile/m4/labels-as-values.m4
Andy Wingo 515bc96855 m4 quoting foo in labels-as-values.m4.
* m4/labels-as-values.m4: More m4 quoting love.

Patch from C. K. Jester-Young <cky944 <at> gmail.com>.
2008-08-26 13:52:20 -07:00

22 lines
605 B
Text

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([
int foo(int);
int foo(i)
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)])
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)
feature, used to speed up instruction dispatch in the interpreter.])
fi
])