MINOR: compiler: rely on builtin detection for __builtin_unreachable()
authorWilly Tarreau <w@1wt.eu>
Tue, 17 Dec 2024 08:10:53 +0000 (09:10 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 17 Apr 2025 15:43:00 +0000 (17:43 +0200)
commitdb879777dc498da7eddb2acf893e72efa95032df
treeb7b4bbfa3465b59d02a4e3f344bf5d4c7787fd88
parentd5ae2c40cfe0ca348322eb3d0ddf4821d4bd1599
MINOR: compiler: rely on builtin detection for __builtin_unreachable()

Due to __builtin_unreachable() only being associated to gcc 4.5 and
above, it turns out it was not enabled for clang. It's not used *that*
much but still a little bit, so let's enable it now. This reduces the
code size by 0.2% and makes it a bit more efficient.

(cherry picked from commit 41fc18b1d1a37e2a6645ea4a8fb4d2d5f009fc0c)
[wt: backported to shut a gcc warning in debug.c with USE_THREAD=0]
Signed-off-by: Willy Tarreau <w@1wt.eu>
include/haproxy/compiler.h