Fix useless warning on AVR

This commit is contained in:
Petteri.Aimonen 2012-02-27 16:44:21 +00:00
parent 90973e833d
commit 91c5422472
1 changed files with 6 additions and 1 deletions

View File

@ -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