diff options
| author | Petteri.Aimonen <Petteri.Aimonen@gmail.com> | 2012-05-06 09:09:16 +0000 |
|---|---|---|
| committer | Petteri.Aimonen <Petteri.Aimonen@gmail.com> | 2012-05-06 09:09:16 +0000 |
| commit | 9169c3663c13ccb266b3bf7f56f9ee4e9aadec71 (patch) | |
| tree | b33bace1b08cae746ecab8c1920a3ed17adb4981 | |
| parent | 329afef0d2c987a1182870405b776d7a1da6feb4 (diff) | |
Fix the check around 'leaf' attribute, which is supported only by GCC > 4.6.
| -rw-r--r-- | libfixmath/fix16.h | 7 |
1 files 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
|
