But older versions of clang don't support it. Instead of relying on compiler version numbers (which is complicated to get right for clang, since there are two different clangs, one released by llvm.org, the other released by Apple, with different version numbering schemes), please use a method like __has_builtin to discover whether it is available.
ChezScheme 10.0.0 fails to build with Apple Clang versions earlier than 800:
This was reported to MacPorts here: https://trac.macports.org/ticket/70278
You use
__builtin_add_overflow
ifUSE_OVERFLOW_INTRINSICS
is defined:https://github.com/cisco/ChezScheme/blob/3d1579e6c67e145895e6a0e7d0f9bf2b8853fbb3/c/pb.h#L382-L404
And you defined it for gcc 5 or greater or any version of clang:
https://github.com/cisco/ChezScheme/blob/3d1579e6c67e145895e6a0e7d0f9bf2b8853fbb3/c/pb.h#L74-L78
But older versions of clang don't support it. Instead of relying on compiler version numbers (which is complicated to get right for clang, since there are two different clangs, one released by llvm.org, the other released by Apple, with different version numbering schemes), please use a method like
__has_builtin
to discover whether it is available.