[PATCH] Honor HP C's noreturn attribute

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



HP C for Integrity servers (Itanium) gained support for noreturn attribute sometime in 2006. It was released in Compiler Version A.06.10 and made available in July 2006.

The __HP_cc define detects the HP C compiler version. Precede the __GNUC__ check so it works well when compiling with HP C using -Agcc option that enables partial support for the GNU C dialect. The -Agcc defines the __GNUC__ too.

Signed-off-by: Michal Rokos <michal.rokos@xxxxxxxxxxx>

diff --git a/git-compat-util.h b/git-compat-util.h
index 9c23622..bf947b1 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -214,7 +214,10 @@ extern char *gitbasename(char *);
 #define is_dir_sep(c) ((c) == '/')
 #endif
 
-#ifdef __GNUC__
+#if __HP_cc >= 61000
+#define NORETURN __attribute__((noreturn))
+#define NORETURN_PTR
+#elif defined(__GNUC__)
 #define NORETURN __attribute__((__noreturn__))
 #define NORETURN_PTR __attribute__((__noreturn__))
 #elif defined(_MSC_VER)

--

Michal Rokos

NextSoft spol. s r.o.
VyskoÄilova 1/1410
140 21 Praha 4
Czech Republic
mobile: +420 736 646 591
fax:    +420 267 224 307
e-mail: rokos@xxxxxxxxxxx

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]