diff --git a/include/nuttx/compiler.h b/include/nuttx/compiler.h index 6204faa7b7ff71ad7c3ad6d9e9ed07499403582e..5ada38075e0619bf5e13a14d04a82c06bd7b8b3a 100644 --- a/include/nuttx/compiler.h +++ b/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