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.
#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 */ \