diff --git a/include/sta/lang.hpp b/include/sta/lang.hpp index f390b50..00a797e 100644 --- a/include/sta/lang.hpp +++ b/include/sta/lang.hpp @@ -34,4 +34,16 @@ #endif // STA_BKPT +// TODO Check for GCC + +/** + * @brief Helper for silencing compiler warnings in unreachable code locations. + * + * Example: Default of switch handling all cases of enum class + */ +#ifndef STA_UNREACHABLE +# define STA_UNREACHABLE() __builtin_unreachable() +#endif // STA_UNREACHABLE + + #endif // STA_LANG_HPP