Otherwise, when compiling with optimisation, the compiler will detect
that b was unused, then use the instructions that i386 supports.
AC_CACHE_CHECK([whether $CC knows __sync_sub_and_fetch()],
dbus_cv_sync_sub_and_fetch,
[AC_LINK_IFELSE(
- AC_LANG_PROGRAM([], [[int a = 4; int b = __sync_sub_and_fetch(&a, 4);]]),
+ AC_LANG_PROGRAM([], [[int a = 4; int b = __sync_sub_and_fetch(&a, 4); exit(b); ]]),
[dbus_cv_sync_sub_and_fetch=yes],
[dbus_cv_sync_sub_and_fetch=no])
])