Skip to contentSkip to conversation

msvc: Add a definition of NORETURN compatible with msvc compiler

PATCH Superseded Ramsay Jones 3 participants 4 messages Jun 15, 2016

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 4/4 msvc: Add a definition of NORETURN compatible with msvc compiler

---

I thought that Erik had already submitted this patch along with those that resulted in commits a4f3131c and 18660bc9. However, I don't seem to be able to find it anywhere! (maybe I only imagined it).

If you find Erik's patch, please apply that instead...

ATB,
Ramsay Jones

 git-compat-util.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
git-compat-util.h +3 -0
index 5c59687..6efea29 100644
@@ -177,6 +177,9 @@ extern char *gitbasename(char *);
 #ifdef __GNUC__
 #define NORETURN __attribute__((__noreturn__))
 #define NORETURN_PTR __attribute__((__noreturn__))
+#elif defined(_MSC_VER)
+#define NORETURN __declspec(noreturn)
+#define NORETURN_PTR
 #else
 #define NORETURN
 #define NORETURN_PTR
Signature · 1 line
1.6.6
#1 lore raw
Quoted 11 lines · Ramsay Jones

---

I thought that Erik had already submitted this patch along with those that resulted in commits a4f3131c and 18660bc9. However, I don't seem to be able to find it anywhere! (maybe I only imagined it).

If you find Erik's patch, please apply that instead...

I don't think I ever sent one - I haven't bothered to set up msvc for git compilation, so I only did the preparation (and I think I sent a comment about how it could be done).

So, thanks for following it up! :)

Signature · 1 line
Erik "kusma" Faye-Lund
#2 lore raw
Quoted 10 lines · Erik Faye-Lund
Quoted 8 lines · Ramsay Jones

---

I thought that Erik had already submitted this patch along with those that resulted in commits a4f3131c and 18660bc9. However, I don't seem to be able to find it anywhere! (maybe I only imagined it).

Quoted 5 lines
Quoted 1 line

If you find Erik's patch, please apply that instead...

I don't think I ever sent one - I haven't bothered to set up msvc for git compilation, so I only did the preparation (and I think I sent a comment about how it could be done).

Ah, so maybe it's this comment that I (mis-)remembered then! (yeah, my memory is not what it used to be ;-)). Thanks for doing the preparation work!

ATB,
Ramsay Jones