aboutsummaryrefslogtreecommitdiff
path: root/gcc/system.h
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-10 22:34:03 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-10 22:34:03 +0000
commit66a5287e74f3ae963d4701edd9072578adb6ef12 (patch)
tree68c8a29210b56a578f8917368423b34eaeea5d60 /gcc/system.h
parent4ba5867e676ca85ae7c379ffe4e65a827aedbc2c (diff)
* cpplex.c (parse_identifier): Fast-path optimize. Avoid
copying identifier when we're just going to throw it away. (parse_identifier_slow): New routine to handle abnormal cases. (_cpp_lex_token): Update call site. * hashtable.c (ht_lookup): Don't assume that the string we've been given is NUL-terminated. * system.h: #define __builtin_expect(a, b) to (a) if not GCC >=3.0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45529 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/system.h')
-rw-r--r--gcc/system.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/system.h b/gcc/system.h
index 6b580830e48..7938fb6bdf2 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -490,6 +490,13 @@ extern void abort PARAMS ((void));
#endif /* ! __FUNCTION__ */
#endif
+/* __builtin_expect(A, B) evaluates to A, but notifies the compiler that
+ the most likely value of A is B. This feature was added at some point
+ between 2.95 and 3.0. Let's use 3.0 as the lower bound for now. */
+#if (GCC_VERSION < 3000)
+#define __builtin_expect(a, b) (a)
+#endif
+
/* Provide some sort of boolean type. We use stdbool.h if it's
available. This must be after all inclusion of system headers,
as some of them will mess us up. */