Skip to content

Commit

Permalink
Make gcc_unreachable() work with MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Leditzky committed Dec 16, 2024
1 parent 4717e3b commit ed131c3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/util/Compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@

#if defined(__GNUC__) || defined(__clang__)
#define gcc_unreachable() __builtin_unreachable()
#elif defined(_MSVC_VER)
#define gcc_unreachable() __assume(false)
#else
#define gcc_unreachable()
#endif
Expand Down

0 comments on commit ed131c3

Please sign in to comment.