From 91c542247268b77a945ee463ee2f73a119ea76a6 Mon Sep 17 00:00:00 2001 From: "Petteri.Aimonen" Date: Mon, 27 Feb 2012 16:44:21 +0000 Subject: [PATCH] Fix useless warning on AVR --- libfixmath/fix16.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libfixmath/fix16.h b/libfixmath/fix16.h index 31d7e00..a0de247 100644 --- a/libfixmath/fix16.h +++ b/libfixmath/fix16.h @@ -11,7 +11,12 @@ extern "C" */ #ifndef FIXMATH_FUNC_ATTRS # ifdef __GNUC__ -# define FIXMATH_FUNC_ATTRS __attribute__((leaf, nothrow, pure)) +# ifdef AVR + // avr-gcc uselessly warns about "leaf". +# define FIXMATH_FUNC_ATTRS __attribute__((nothrow, pure)) +# else +# define FIXMATH_FUNC_ATTRS __attribute__((leaf, nothrow, pure)) +# endif # else # define FIXMATH_FUNC_ATTRS # endif