Skip to content

Commit b6ab349

Browse files
Michal Rokosgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 987893d commit b6ab349

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

git-compat-util.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,10 @@ extern char *gitbasename(char *);
208208
#define is_dir_sep(c) ((c) == '/')
209209
#endif
210210

211-
#ifdef __GNUC__
211+
#if __HP_cc >= 61000
212+
#define NORETURN __attribute__((noreturn))
213+
#define NORETURN_PTR
214+
#elif defined(__GNUC__)
212215
#define NORETURN __attribute__((__noreturn__))
213216
#define NORETURN_PTR __attribute__((__noreturn__))
214217
#elif defined(_MSC_VER)

0 commit comments

Comments
 (0)