diff --git a/ChangeLog b/ChangeLog index 4f1e6a0837..344ad21acb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Apr 2 17:43:17 2014 Nobuyoshi Nakada + + * configure.in (ac_cv_func___builtin_setjmp): gcc 4.9 disallows a + variable as the second argument of __builtin_longjmp(). + [ruby-core:61800] [Bug #9692] + Wed Apr 2 15:12:18 2014 SHIBATA Hiroshi * common.mk: Use redmine-2.x url for DeveloperHowto wiki. diff --git a/configure.in b/configure.in index 3845f05c7c..71b3da9613 100644 --- a/configure.in +++ b/configure.in @@ -2076,8 +2076,13 @@ AC_CACHE_CHECK(for sigsetjmp as a macro or function, ac_cv_func_sigsetjmp, AC_CACHE_CHECK(for __builtin_setjmp, ac_cv_func___builtin_setjmp, [AC_TRY_LINK([@%:@include - jmp_buf jb; void t(v) int v; {__builtin_longjmp(jb, v);}], - [__builtin_setjmp(jb);], + @%:@include + jmp_buf jb; + void t(void) {__builtin_longjmp(jb, 1);}], + [ + void (*volatile f)(void) = t; + if (!__builtin_setjmp(jb)) printf("%d\n", f != 0); + ], [ac_cv_func___builtin_setjmp=yes], [ac_cv_func___builtin_setjmp=no]) ])