diff --git a/configure.ac b/configure.ac index 54f9f71bd..8d764d3a0 100644 --- a/configure.ac +++ b/configure.ac @@ -43,12 +43,12 @@ AC_DEFUN([CHECK_COMPILER_BUILTIN], AC_MSG_RESULT(AS_VAR_GET([[have_]$1])) AS_IF([test yes = AS_VAR_GET([[have_]$1])], [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_]$1), 1, - [Define to 1 if the system has the `]$1[' built-in function])], [] + [Define to 1 if the system has the `]$1[' built-in function])], + [AC_MSG_ERROR([`]$1[' is required, giving up.])] )]) CHECK_COMPILER_BUILTIN([__builtin_unreachable],[]); - dnl ## dnl ## Locate the GAP root dir dnl ## diff --git a/gapbind14/include/gapbind14/cpp_fn.hpp b/gapbind14/include/gapbind14/cpp_fn.hpp index a4e05f4ed..6123170a7 100644 --- a/gapbind14/include/gapbind14/cpp_fn.hpp +++ b/gapbind14/include/gapbind14/cpp_fn.hpp @@ -24,8 +24,7 @@ #include // for tuple, tuple_element_t #include // for true_type -#include "../../../src/semigroups-config.hpp" // for SEMIGRUOPS_HAVE___BUILTIN_UNREACHABLE -#include "gap_include.hpp" // for UInt +#include "gap_include.hpp" // for UInt namespace gapbind14::detail { // Inspired by the possible implementation of std::unreachable (C++23) @@ -36,7 +35,7 @@ namespace gapbind14::detail { // an empty function body and the noreturn attribute. #if defined(_MSC_VER) && !defined(__clang__) // MSVC __assume(false); -#elif defined(SEMIGROUPS_HAVE___BUILTIN_UNREACHABLE) +#else __builtin_unreachable(); #endif }