Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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 ##
Expand Down
5 changes: 2 additions & 3 deletions gapbind14/include/gapbind14/cpp_fn.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
#include <tuple> // for tuple, tuple_element_t
#include <type_traits> // 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)
Expand All @@ -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
}
Expand Down
Loading