Introduce USED_ATTR wrapper for __attribute__((used)).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31188 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Boris Gjenero 2011-12-09 15:33:59 +00:00
parent 9653ae364c
commit 59e71ee80c
11 changed files with 35 additions and 10 deletions

View file

@ -57,4 +57,13 @@
#define FORCE_INLINE inline
#endif
/* Version information from http://ohse.de/uwe/articles/gcc-attributes.html */
#if defined(__GNUC__) && (__GNUC__ >= 4 || \
(__GNUC__ >= 3 && __GNUC_MINOR__ >= 1))
#define USED_ATTR __attribute__((used))
#else
#define USED_ATTR
#endif
#endif /* _GCC_EXTENSIONS_H_ */