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:
Willy Tarreau 2021-03-09 10:08:05 +01:00
parent b7e0c633e8
commit 82a92743fc

View File

@ -74,7 +74,7 @@
#endif
/* 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) \
do { \
/* provoke a build-time error */ \