]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] work around gcc-3.x inlining bugs
authorAndrew Morton <akpm@digeo.com>
Mon, 10 Mar 2003 15:42:00 +0000 (07:42 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Mon, 10 Mar 2003 15:42:00 +0000 (07:42 -0800)
Force inlining even when gcc-3.x is too confused to do it for us.

include/linux/compiler.h

index e92f4723c1e2f65dcd6f407a2d75d8b35139f3ee..a28d0d51b851ffdd94dbf3a9f1c47cb60d874d4f 100644 (file)
@@ -1,6 +1,12 @@
 #ifndef __LINUX_COMPILER_H
 #define __LINUX_COMPILER_H
 
+#if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
+#define inline         __inline__ __attribute__((always_inline))
+#define __inline__     __inline__ __attribute__((always_inline))
+#define __inline       __inline__ __attribute__((always_inline))
+#endif
+
 /* Somewhere in the middle of the GCC 2.96 development cycle, we implemented
    a mechanism by which the user can annotate likely branch directions and
    expect the blocks to be reordered appropriately.  Define __builtin_expect