mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 22:31:28 +02:00
BUILD: bug: refine HA_LINK_ERROR() to only be used on gcc and derivatives
TCC happens to define __OPTIMIZE__ at -O2 but doesn't proceed with dead code elimination, resulting in ha_free() to always reference the link error symbol. Let's condition this test on __GCC__ which others like Clang also define.
This commit is contained in:
parent
b7e0c633e8
commit
82a92743fc
@ -74,7 +74,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* When not optimizing, clang won't remove that code, so only compile it in when optimizing */
|
/* When not optimizing, clang won't remove that code, so only compile it in when optimizing */
|
||||||
#ifdef __OPTIMIZE__
|
#if defined(__GNUC__) && defined(__OPTIMIZE__)
|
||||||
#define HA_LINK_ERROR(what) \
|
#define HA_LINK_ERROR(what) \
|
||||||
do { \
|
do { \
|
||||||
/* provoke a build-time error */ \
|
/* provoke a build-time error */ \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user