enhanced the check for labels as values support

This commit is contained in:
hyunghwan.chung 2017-09-26 15:17:28 +00:00
parent a05c86dd27
commit 002424626f
2 changed files with 2 additions and 2 deletions

2
moo/configure vendored
View File

@ -18695,7 +18695,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
int
main ()
{
void *jp = &&jpt; goto *jp; 1; jpt: 2;
void* jp[] = { &&jpt1, &&jpt2, &&jpt3 }; goto *jp[1]; jpt1: 1; jpt2: 2; jpt3: 3;
;
return 0;
}

View File

@ -142,7 +142,7 @@ AC_LINK_IFELSE(
AC_MSG_CHECKING([labels as values])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM( [], [[void *jp = &&jpt; goto *jp; 1; jpt: 2; ]])],
[AC_LANG_PROGRAM( [], [[void* jp[] = { &&jpt1, &&jpt2, &&jpt3 }; goto *jp[1]; jpt1: 1; jpt2: 2; jpt3: 3; ]])],
[AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_LABELS_AS_VALUES, 1, [labels as values])],
[AC_MSG_RESULT(no)]