Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bsd_compat.h: fix __builtin_unreachable() detection with GCC
GCC has __GNUC_MINOR__ set to 2 (from godbolt). As it was detecting a specific version of it, __builtin_unreachable() was never being used with GCC (as __GNUC_MINOR__ < 6). From godbolt, it looks like __builtin_unreachable() was introducued somewhere between 4.4.7 to 4.5.3. These versions were released back in 2011, so I think it's safe to assume that most systems have at least 4.5 or higher. For Clang, __builtin_unreachable() (from godbolt test), available since at least 3.0, which was released in 2011 as well. Signed-off-by: rilysh <[email protected]>
- Loading branch information