mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-06-12 01:25:59 +00:00
Adde helper for unreachable code paths
This commit is contained in:
parent
073fe83e7e
commit
de4f610843
@ -34,4 +34,16 @@
|
|||||||
#endif // STA_BKPT
|
#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
|
#endif // STA_LANG_HPP
|
||||||
|
Loading…
x
Reference in New Issue
Block a user