+2017-10-02 Martin Sebor <msebor@redhat.com>
+
+ PR c/81854
+ * acinclude.m4 (LIBAT_CHECK_IFUNC): Have ifunc resolver return
+ a function pointer rather than void* to avoid GCC 8 warnings.
+ * configure: Regenerate.
+ * libatomic_i.h: Declare ifunc resolvers to return function
+ pointers rather than void*.
+
2017-05-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* testsuite/lib/libatomic.exp: Load scanlang.exp.
CFLAGS="$CFLAGS -Werror"
AC_TRY_LINK([
int foo_alt(void) { return 0; }
- void *foo_sel(void) { return foo_alt; }
+ typedef int F (void);
+ F *foo_sel(void) { return foo_alt; }
int foo(void) __attribute__((ifunc("foo_sel")));],
[return foo();], libat_cv_have_ifunc=yes, libat_cv_have_ifunc=no)])
LIBAT_DEFINE_YESNO([HAVE_IFUNC], [$libat_cv_have_ifunc],
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atomic_load/store for size 2" >&5
$as_echo_n "checking for __atomic_load/store for size 2... " >&6; }
if test "${libat_cv_have_at_ldst_2+set}" = set; then :
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atomic_load/store for size 4" >&5
$as_echo_n "checking for __atomic_load/store for size 4... " >&6; }
if test "${libat_cv_have_at_ldst_4+set}" = set; then :
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atomic_load/store for size 8" >&5
$as_echo_n "checking for __atomic_load/store for size 8... " >&6; }
if test "${libat_cv_have_at_ldst_8+set}" = set; then :
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atomic_load/store for size 16" >&5
$as_echo_n "checking for __atomic_load/store for size 16... " >&6; }
if test "${libat_cv_have_at_ldst_16+set}" = set; then :
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atomic_test_and_set for size 1" >&5
$as_echo_n "checking for __atomic_test_and_set for size 1... " >&6; }
if test "${libat_cv_have_at_tas_1+set}" = set; then :
/* end confdefs.h. */
int foo_alt(void) { return 0; }
- void *foo_sel(void) { return foo_alt; }
+ typedef int F (void);
+ F *foo_sel(void) { return foo_alt; }
int foo(void) __attribute__((ifunc("foo_sel")));
int
main ()
# if IFUNC_NCOND(N) == 1
# define GEN_SELECTOR(X) \
extern typeof(C2(libat_,X)) C3(libat_,X,_i1) HIDDEN; \
- static void * C2(select_,X) (void) \
+ static typeof(C2(libat_,X)) * C2(select_,X) (void) \
{ \
if (IFUNC_COND_1) \
return C3(libat_,X,_i1); \
# define GEN_SELECTOR(X) \
extern typeof(C2(libat_,X)) C3(libat_,X,_i1) HIDDEN; \
extern typeof(C2(libat_,X)) C3(libat_,X,_i2) HIDDEN; \
- static void * C2(select_,X) (void) \
+ static typeof(C2(libat_,X)) * C2(select_,X) (void) \
{ \
if (IFUNC_COND_1) \
return C3(libat_,X,_i1); \
extern typeof(C2(libat_,X)) C3(libat_,X,_i1) HIDDEN; \
extern typeof(C2(libat_,X)) C3(libat_,X,_i2) HIDDEN; \
extern typeof(C2(libat_,X)) C3(libat_,X,_i3) HIDDEN; \
- static void * C2(select_,X) (void) \
+ static typeof(C2(libat_,X)) * C2(select_,X) (void) \
{ \
if (IFUNC_COND_1) \
return C3(libat_,X,_i1); \