aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libfixmath/fix16.h7
1 files changed, 6 insertions, 1 deletions
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