mirror of
https://github.com/yshui/picom.git
synced 2024-11-25 14:06:08 -05:00
compiler: abort in debug build if unreachable() is reached
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
9b6b6855d7
commit
8d0284da1b
1 changed files with 2 additions and 2 deletions
|
@ -105,9 +105,9 @@
|
||||||
|
|
||||||
#ifndef unreachable
|
#ifndef unreachable
|
||||||
# if defined(__GNUC__) || defined(__clang__)
|
# if defined(__GNUC__) || defined(__clang__)
|
||||||
# define unreachable() __builtin_unreachable()
|
# define unreachable() assert(false); __builtin_unreachable()
|
||||||
# else
|
# else
|
||||||
# define unreachable() do {} while(0)
|
# define unreachable() assert(false); do {} while(0)
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue