This allows the compiler to understand that constructs such as
assert(0) won't return.

This fixes warnings (treated as errors) about a missing return in
https://github.com/llvm/llvm-project/blob/llvmorg-16.0.0/libcxxabi/test/cxa_vec_new_overflow_PR41395.pass.cpp#L21

Signed-off-by: Martin Storsjö <mar...@martin.st>
---
 mingw-w64-headers/crt/assert.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mingw-w64-headers/crt/assert.h b/mingw-w64-headers/crt/assert.h
index 6d33eacfb..a8cfb2e83 100644
--- a/mingw-w64-headers/crt/assert.h
+++ b/mingw-w64-headers/crt/assert.h
@@ -21,8 +21,8 @@
 extern "C" {
 #endif
 
-_CRTIMP void __cdecl _wassert(const wchar_t *_Message,const wchar_t 
*_File,unsigned _Line);
-_CRTIMP void __cdecl _assert (const char *_Message, const char *_File, 
unsigned _Line);
+_CRTIMP void __cdecl __MINGW_ATTRIB_NORETURN _wassert(const wchar_t 
*_Message,const wchar_t *_File,unsigned _Line);
+_CRTIMP void __cdecl __MINGW_ATTRIB_NORETURN _assert (const char *_Message, 
const char *_File, unsigned _Line);
 
 #ifdef __cplusplus
 }
-- 
2.34.1



_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to