__builtin_expect usage
Momchil Velikov
velco@fadata.bg
Sun Mar 4 05:28:00 GMT 2001
Hi,
The `__builtin_expect' function in not present in gcc <= 2.95.3.
Regards,
-velco
2001-03-04 Momchil Velikov <velco@fadata.bg>
* sidconfig.h (LIKELY, UNLIKELY): Do not try to use
`__builtin_expect' in versions of gcc less than 3.
--- sidconfig.h~ Thu Mar 1 22:48:37 2001
+++ sidconfig.h Sun Mar 4 15:20:28 2001
@@ -13,7 +13,7 @@
// Globally useful macros
-#ifdef __GNUC__
+#if defined (__GNUC__) && __GNUC__ > 2
#define LIKELY(expression) (__builtin_expect(!!(expression), 1))
#define UNLIKELY(expression) (__builtin_expect(!!(expression), 0))
#else
More information about the Sid
mailing list