summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorMichal Rokos <rokos@nextsoft.cz>2011-03-07 13:13:15 +0100
committerJunio C Hamano <gitster@pobox.com>2011-03-08 10:58:00 -0800
commitb6ab349b184b3a33c7bcc03521dafed3f9df380a (patch)
tree026941f6103671b97a53ff817b542064357e0410 /git-compat-util.h
parent987893d82df390d7ed72e46f0cf8340d140952c1 (diff)
downloadgit-b6ab349b184b3a33c7bcc03521dafed3f9df380a.tar.gz
git-compat-util.h: Honor HP C's noreturn attribute
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>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index d6d269f138..e2d7e50179 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -208,7 +208,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)