tools include compiler-gcc: Add __pure attribute helper
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: 6e1690c4c0b540930f08295b6a95c8660b257745 Gitweb: https://git.kernel.org/tip/6e1690c4c0b540930f08295b6a95c8660b257745 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Thu, 17 May 2018 15:12:36 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Thu, 17 May 2018 15:17:21 -0300
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]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/include/linux/compiler-gcc.h | 3 +++ 1 file changed, 3 insertions(+)
tools/include/linux/compiler-gcc.h +3 -0
@@ -21,6 +21,9 @@/* &a[0] degrades to a pointer: a different type from an array */ #define __must_be_array (a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) +#ifndef __pure +#define __pure __attribute__((pure)) +#endif #define noinline __attribute__((noinline))#ifndef __packed#define __packed __attribute__((packed))