aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/compiler-gcc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/compiler-gcc.h')
-rw-r--r--include/linux/compiler-gcc.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index acd583384bd9..fe23792f05c1 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -36,10 +36,20 @@
36#define __weak __attribute__((weak)) 36#define __weak __attribute__((weak))
37#define __naked __attribute__((naked)) 37#define __naked __attribute__((naked))
38#define __noreturn __attribute__((noreturn)) 38#define __noreturn __attribute__((noreturn))
39
40/*
41 * From the GCC manual:
42 *
43 * Many functions have no effects except the return value and their
44 * return value depends only on the parameters and/or global
45 * variables. Such a function can be subject to common subexpression
46 * elimination and loop optimization just as an arithmetic operator
47 * would be.
48 * [...]
49 */
39#define __pure __attribute__((pure)) 50#define __pure __attribute__((pure))
40#define __aligned(x) __attribute__((aligned(x))) 51#define __aligned(x) __attribute__((aligned(x)))
41#define __printf(a,b) __attribute__((format(printf,a,b))) 52#define __printf(a,b) __attribute__((format(printf,a,b)))
42#define noinline __attribute__((noinline)) 53#define noinline __attribute__((noinline))
43#define __attribute_pure__ __attribute__((pure))
44#define __attribute_const__ __attribute__((__const__)) 54#define __attribute_const__ __attribute__((__const__))
45#define __maybe_unused __attribute__((unused)) 55#define __maybe_unused __attribute__((unused))