summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 987893d)
raw | patch | inline | side by side (parent: 987893d)
author | Michal Rokos <rokos@nextsoft.cz> | |
Mon, 7 Mar 2011 12:13:15 +0000 (13:13 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 8 Mar 2011 18:58:00 +0000 (10:58 -0800) |
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@nextsoft.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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@nextsoft.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-compat-util.h | patch | blob | history |
diff --git a/git-compat-util.h b/git-compat-util.h
index d6d269f138b06791ba6e8712b06036f00a73c7e3..e2d7e50179cca849f2e2097772439ba5840915ec 100644 (file)
--- a/git-compat-util.h
+++ b/git-compat-util.h
#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)