Skip to content

Commit 6e1690c

Browse files
committed
tools include compiler-gcc: Add __pure attribute helper
Adopt it from the kernel sources, will be used soon. Cc: Adrian Hunter <[email protected]> Cc: David Ahern <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Wang Nan <[email protected]> Link: https://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 789e465 commit 6e1690c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/include/linux/compiler-gcc.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
/* &a[0] degrades to a pointer: a different type from an array */
2222
#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
2323

24+
#ifndef __pure
25+
#define __pure __attribute__((pure))
26+
#endif
2427
#define noinline __attribute__((noinline))
2528
#ifndef __packed
2629
#define __packed __attribute__((packed))

0 commit comments

Comments
 (0)