mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-20 11:11:24 +00:00
Replace a CONSTCOND for a void value as a replacement for __unreachable builtin
This only applies if we are not using clang or gcc but it lets us use the __unreachable() buitin in expressions. Suggested by: tijl
This commit is contained in:
parent
d433cf9a8a
commit
1d8055035f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=282981
@ -391,7 +391,7 @@
|
|||||||
#if __has_builtin(__builtin_unreachable) || __GNUC_PREREQ__(4, 6)
|
#if __has_builtin(__builtin_unreachable) || __GNUC_PREREQ__(4, 6)
|
||||||
#define __unreachable() __builtin_unreachable()
|
#define __unreachable() __builtin_unreachable()
|
||||||
#else
|
#else
|
||||||
#define __unreachable() do {} while (/*CONSTCOND*/0)
|
#define __unreachable() ((void)0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __has_attribute(alloc_align) || __GNUC_PREREQ__(4, 9)
|
#if __has_attribute(alloc_align) || __GNUC_PREREQ__(4, 9)
|
||||||
|
Loading…
Reference in New Issue
Block a user