We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42e0eef commit 7a46410Copy full SHA for 7a46410
src/main.cpp
@@ -54,11 +54,20 @@
54
#endif // forceinline
55
56
57
+#if __has_attribute(noreturn)
58
+# define noreturn [[noreturn]]
59
+#elif defined(_MSC_VER)
60
+# define noreturn __declspec(noreturn)
61
+#else
62
+# define noreturn
63
+#endif
64
+
65
66
inline namespace builtins
67
{
68
69
#if !(__has_builtin(__builtin_unreachable) || (40500 <= COMPILER_GNUC_VERSION))
-[[noreturn]] inline void __builtin_unreachable() {}
70
+noreturn inline void __builtin_unreachable() {}
71
#endif // !__builtin_unreachable
72
73
0 commit comments