diff options
Diffstat (limited to 'nuttx')
-rw-r--r-- | nuttx/include/nuttx/compiler.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/nuttx/include/nuttx/compiler.h b/nuttx/include/nuttx/compiler.h index 6204faa7b..5ada38075 100644 --- a/nuttx/include/nuttx/compiler.h +++ b/nuttx/include/nuttx/compiler.h @@ -44,10 +44,18 @@ * Definitions ************************************************************/ -#define weak_alias(name, aliasname) \ - extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))); -#define weak_function __attribute__ ((weak)) -#define weak_const_function __attribute__ ((weak, __const__)) +#ifdef __GNUC__ +# define weak_alias(name, aliasname) \ + extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))); +# define weak_function __attribute__ ((weak)) +# define weak_const_function __attribute__ ((weak, __const__)) +# define noreturn_function +#else +# define weak_alias(name, aliasname) +# define weak_function +# define weak_const_function +# define noreturn_function +#endif /************************************************************ * Global Function Prototypes |