Commit ffd4029c authored by kgardas's avatar kgardas

fix compilation failure on OpenBSD with system supplied GNU C 4.2.1

Summary:
This patch fixes compilation failure on OpenBSD. The OpenBSD's
GNU C compiler is of 4.2.1 version and problematic __builtin_unreachable
was added in GNU C 4.5 release. Let's use pure abort() call
on OpenBSD instead of __builtin_unreachable

Reviewers: bgamari, austin, erikd, simonmar

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2453
parent 18f06878
......@@ -164,8 +164,11 @@ compactAllocateBlockInternal(Capability *cap,
default:
#ifdef DEBUG
ASSERT(!"code should not be reached");
#else
#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
/* __builtin_unreachable is supported since GNU C 4.5 */
__builtin_unreachable();
#else
abort();
#endif
}
RELEASE_SM_LOCK;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment