From 9169c3663c13ccb266b3bf7f56f9ee4e9aadec71 Mon Sep 17 00:00:00 2001 From: "Petteri.Aimonen" Date: Sun, 6 May 2012 09:09:16 +0000 Subject: Fix the check around 'leaf' attribute, which is supported only by GCC > 4.6. --- libfixmath/fix16.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libfixmath/fix16.h b/libfixmath/fix16.h index a0de247..6e5c428 100644 --- a/libfixmath/fix16.h +++ b/libfixmath/fix16.h @@ -11,11 +11,10 @@ extern "C" */ #ifndef FIXMATH_FUNC_ATTRS # ifdef __GNUC__ -# ifdef AVR - // avr-gcc uselessly warns about "leaf". -# define FIXMATH_FUNC_ATTRS __attribute__((nothrow, pure)) -# else +# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 6) # define FIXMATH_FUNC_ATTRS __attribute__((leaf, nothrow, pure)) +# else +# define FIXMATH_FUNC_ATTRS __attribute__((nothrow, pure)) # endif # else # define FIXMATH_FUNC_ATTRS -- cgit v1.2.3