Fix the check around 'leaf' attribute, which is supported only by GCC > 4.6.

This commit is contained in:
Petteri.Aimonen 2012-05-06 09:09:16 +00:00
parent 329afef0d2
commit 9169c3663c
1 changed files with 3 additions and 4 deletions

View File

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