From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnaldo Carvalho de Melo Subject: [PATCH 09/18] tools include compiler-gcc: Add __pure attribute helper Date: Sat, 19 May 2018 07:54:58 -0300 Message-ID: <20180519105507.16450-10-acme@kernel.org> References: <20180519105507.16450-1-acme@kernel.org> Return-path: In-Reply-To: <20180519105507.16450-1-acme@kernel.org> Sender: linux-kernel-owner@vger.kernel.org To: Ingo Molnar Cc: Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Arnaldo Carvalho de Melo , Adrian Hunter , David Ahern , Jiri Olsa , Namhyung Kim , Wang Nan List-Id: linux-perf-users.vger.kernel.org From: Arnaldo Carvalho de Melo Adopt it from the kernel sources, will be used soon. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-oubheiqj8edo5rzewt11cbn0@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/include/linux/compiler-gcc.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/include/linux/compiler-gcc.h b/tools/include/linux/compiler-gcc.h index a3a4427441bf..70fe61295733 100644 --- a/tools/include/linux/compiler-gcc.h +++ b/tools/include/linux/compiler-gcc.h @@ -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)) -- 2.14.3