mirror of
https://github.com/yshui/picom.git
synced 2024-11-18 13:55:36 -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
|
||||
# if defined(__GNUC__) || defined(__clang__)
|
||||
# define unreachable() __builtin_unreachable()
|
||||
# define unreachable() assert(false); __builtin_unreachable()
|
||||
# else
|
||||
# define unreachable() do {} while(0)
|
||||
# define unreachable() assert(false); do {} while(0)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue