aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/compiler-gcc4.h3
-rw-r--r--include/linux/compiler.h4
2 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h
index a3aef5d55dba..f1709c1f9eae 100644
--- a/include/linux/compiler-gcc4.h
+++ b/include/linux/compiler-gcc4.h
@@ -39,3 +39,6 @@
39#endif 39#endif
40 40
41#define __compiletime_object_size(obj) __builtin_object_size(obj, 0) 41#define __compiletime_object_size(obj) __builtin_object_size(obj, 0)
42#if __GNUC_MINOR__ >= 4
43#define __compiletime_warning(message) __attribute__((warning(message)))
44#endif
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 8e54108688f9..950356311f12 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -270,6 +270,10 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
270#ifndef __compiletime_object_size 270#ifndef __compiletime_object_size
271# define __compiletime_object_size(obj) -1 271# define __compiletime_object_size(obj) -1
272#endif 272#endif
273#ifndef __compiletime_warning
274# define __compiletime_warning(message)
275#endif
276
273/* 277/*
274 * Prevent the compiler from merging or refetching accesses. The compiler 278 * Prevent the compiler from merging or refetching accesses. The compiler
275 * is also forbidden from reordering successive instances of ACCESS_ONCE(), 279 * is also forbidden from reordering successive instances of ACCESS_ONCE(),