]> The Tcpdump Group git mirrors - tcpdump/blobdiff - funcattrs.h
Use more the EXTRACT_U_1() macro (40/n)
[tcpdump] / funcattrs.h
index bea986342cd3378db38ca738bac4d999ff92d55d..cb0678eaa8a2be72680962b3b2121ceac56d92b8 100644 (file)
   /*
    * 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))
+  #if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) < 401)) \
+      || (defined(__SUNPRO_C))
     #define NORETURN_FUNCPTR
   #else
     #define NORETURN_FUNCPTR __attribute((noreturn))
 #elif defined(_MSC_VER)
   /*
    * MSVC.
+   * It doesn't allow __declspec(noreturn) to be applied to function
+   * pointers.
    */
   #define NORETURN __declspec(noreturn)
-  #define NORETURN_FUNCPTR __declspec(noreturn)
+  #define NORETURN_FUNCPTR
 #else
   #define NORETURN
   #define NORETURN_FUNCPTR