compiler-gcc2.h 997 B

1234567891011121314151617181920212223242526272829
  1. /* Never include this file directly. Include <linux/compiler.h> instead. */
  2. /* These definitions are for GCC v2.x. */
  3. /* Somewhere in the middle of the GCC 2.96 development cycle, we implemented
  4. a mechanism by which the user can annotate likely branch directions and
  5. expect the blocks to be reordered appropriately. Define __builtin_expect
  6. to nothing for earlier compilers. */
  7. #include <linux/compiler-gcc.h>
  8. #if __GNUC_MINOR__ < 96
  9. # define __builtin_expect(x, expected_value) (x)
  10. #endif
  11. #define __attribute_used__ __attribute__((__unused__))
  12. /*
  13. * The attribute `pure' is not implemented in GCC versions earlier
  14. * than 2.96.
  15. */
  16. #if __GNUC_MINOR__ >= 96
  17. # define __attribute_pure__ __attribute__((pure))
  18. # define __attribute_const__ __attribute__((__const__))
  19. #endif
  20. /* GCC 2.95.x/2.96 recognize __va_copy, but not va_copy. Actually later GCC's
  21. * define both va_copy and __va_copy, but the latter may go away, so limit this
  22. * to this header */
  23. #define va_copy __va_copy