From: Willy Tarreau Date: Fri, 25 Feb 2022 08:01:36 +0000 (+0100) Subject: DEBUG: mark ABORT_NOW() as unreachable X-Git-Tag: v2.6-dev2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f19aab88d5c92e9cb9cbb9f7c9b84e39ba2e2709;p=thirdparty%2Fhaproxy.git DEBUG: mark ABORT_NOW() as unreachable The purpose is to make the program die at this point, so let's help the compiler optimise the code (especially in sensitive areas) by telling it that ABORT_NOW() does not return. This reduces the overall code size by ~0.5%. --- diff --git a/include/haproxy/bug.h b/include/haproxy/bug.h index ddf55e8057..4cedbf11f7 100644 --- a/include/haproxy/bug.h +++ b/include/haproxy/bug.h @@ -47,7 +47,7 @@ /* More efficient than abort() because it does not mangle the * stack and stops at the exact location we need. */ -#define ABORT_NOW() do { DUMP_TRACE(); (*(volatile int*)1=0); } while (0) +#define ABORT_NOW() do { DUMP_TRACE(); (*(volatile int*)1=0); my_unreachable(); } while (0) #endif /* This is the generic low-level macro dealing with conditional warnings and