* HP aCC A.06.10 and later.
*/
#define NORETURN __attribute((noreturn))
+
+ /*
+ * However, GCC didn't support that for function *pointers* until GCC
+ * 4.1.0; see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3481.
+ *
+ * Sun C/Oracle Studio C doesn't seem to support it, either.
+ */
+ #if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) < 401)) \
+ || (defined(__SUNPRO_C))
+ #define NORETURN_FUNCPTR
+ #else
+ #define NORETURN_FUNCPTR __attribute((noreturn))
+ #endif
#elif defined(_MSC_VER)
/*
* MSVC.
+ * It doesn't allow __declspec(noreturn) to be applied to function
+ * pointers.
*/
#define NORETURN __declspec(noreturn)
+ #define NORETURN_FUNCPTR
#else
#define NORETURN
+ #define NORETURN_FUNCPTR
#endif
/*
* or HP aCC A.06.10 and later.
*/
#define PRINTFLIKE(x,y) __attribute__((__format__(__printf__,x,y)))
+
+ /*
+ * However, GCC didn't support that for function *pointers* until GCC
+ * 4.1.0; see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3481.
+ */
+ #if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) < 401))
+ #define PRINTFLIKE_FUNCPTR(x,y)
+ #else
+ #define PRINTFLIKE_FUNCPTR(x,y) __attribute__((__format__(__printf__,x,y)))
+ #endif
#else
#define PRINTFLIKE(x,y)
+ #define PRINTFLIKE_FUNCPTR(x,y)
#endif
/*