From e738b8cbe64b6dd3ed9f47b6d4cd7eb2c422b38d Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Tue, 30 Aug 2016 16:39:54 -0400 Subject: restore _Noreturn to __assert_fail this reverts commit 2c1f8fd5da3306fd7c8a2267467e44eb61f12dd4. without the _Noreturn attribute, the compiler cannot use asserts to perform reachability/range analysis. this leads to missed optimizations and spurious warnings. the original backtrace problem that prompted the removal of _Noreturn was not clearly documented at the time, but it seems to happen only when libc was built without -g, which also breaks many other backtracing cases. --- include/assert.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/assert.h') diff --git a/include/assert.h b/include/assert.h index e679adbf..d14ec94e 100644 --- a/include/assert.h +++ b/include/assert.h @@ -16,7 +16,7 @@ extern "C" { #endif -void __assert_fail (const char *, const char *, int, const char *); +_Noreturn void __assert_fail (const char *, const char *, int, const char *); #ifdef __cplusplus } -- cgit v1.2.1