From 2dd570ec85a4f9477a6064b8d59fdbc614db7b35 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 7 Feb 2011 15:52:21 +0100 Subject: include: [c.h] move ignore_result() to gcc-only block Signed-off-by: Karel Zak --- include/c.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/c.h') diff --git a/include/c.h b/include/c.h index 70e911ddc..02c29e960 100644 --- a/include/c.h +++ b/include/c.h @@ -16,9 +16,12 @@ # define __must_be_array(a) \ BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(typeof(a), typeof(&a[0]))) +# define ignore_result(x) ({ typeof(x) __dummy = (x); (void) __dummy; }) + #else /* !__GNUC__ */ # define __must_be_array(a) 0 # define __attribute__(_arg_) +# define ignore_result(x) ((void) (x)) #endif /* !__GNUC__ */ @@ -62,7 +65,6 @@ _max1 > _max2 ? _max1 : _max2; }) #endif -#define ignore_result(x) ({ typeof(x) __dummy = (x); (void) __dummy; }) static inline __attribute__((const)) int is_power_of_2(unsigned long num) { -- cgit v1.2.3-55-g7522