Skip to content

Commit

Permalink
fwd: Mark __MCF_runtime_failure() noexcept
Browse files Browse the repository at this point in the history
(cherry picked from commit 8424c61)
Signed-off-by: LIU Hao <[email protected]>
  • Loading branch information
lhmouse committed Nov 16, 2024
1 parent 02bac9a commit 36b0998
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mcfgthread/fwd.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ template<> struct __MCF_static_assert<true> { };
/* The `__MCF_ASSERT()` and `__MCF_CHECK()` macros perform run-time checks. If
* an argument yields false, `__MCF_ASSERT()` results in undefined behavior,
* and `__MCF_CHECK()` effects abnormal termination of the current program. */
__MCF_FWD_IMPORT __MCF_NEVER_RETURN __MCF_NEVER_INLINE __MCF_FN_COLD
void
__MCF_runtime_failure(const char* __where) __MCF_noexcept;

#define __MCF_ASSERT(...) ((__VA_ARGS__) ? (void) 0 : __MCF_UNREACHABLE)
#define __MCF_CHECK(...) ((__VA_ARGS__) ? (void) 0 : __MCF_runtime_failure(__MCF_EX __func__))

Expand Down Expand Up @@ -270,9 +274,5 @@ size_t
_MCF_maxz(size_t __x, size_t __y) __MCF_noexcept
{ return (__x < __y) ? __y : __x; }

__MCF_FWD_IMPORT __MCF_NEVER_RETURN __MCF_NEVER_INLINE __MCF_FN_COLD
void
__MCF_runtime_failure(const char* __where);

__MCF_CXX(}) /* extern "C" */
#endif /* __MCFGTHREAD_FWD_ */

0 comments on commit 36b0998

Please sign in to comment.