This is the mail archive of the
sid@sources.redhat.com
mailing list for the SID project.
__builtin_expect usage
- To: SID <sid at sources dot redhat dot com>
- Subject: __builtin_expect usage
- From: Momchil Velikov <velco at fadata dot bg>
- Date: 04 Mar 2001 15:36:56 +0200
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