summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-06-06 11:04:48 +0200
committerAraq <rumpf_a@web.de>2015-06-06 11:59:34 +0200
commit706080dcbdafd8c87f73edac3707a2e5605656b8 (patch)
tree8f67f17da7ac3c58c8a21a7a092311f4701dce69
parent9d03d166a8bc4fb933f76596a89e30447869f83f (diff)
downloadNim-706080dcbdafd8c87f73edac3707a2e5605656b8.tar.gz
fixes 'noreturn' regression for Visual C++
-rw-r--r--compiler/cgen.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/cgen.nim b/compiler/cgen.nim
index 4b0bac28a..91877833a 100644
--- a/compiler/cgen.nim
+++ b/compiler/cgen.nim
@@ -721,6 +721,8 @@ proc genProcPrototype(m: BModule, sym: PSym) =
                         getTypeDesc(m, sym.loc.t), mangleDynLibProc(sym)))
   elif not containsOrIncl(m.declaredProtos, sym.id):
     var header = genProcHeader(m, sym)
+    if sfNoReturn in sym.flags and hasDeclspec in extccomp.CC[cCompiler].props:
+      header = "__declspec(noreturn) " & header
     if sym.typ.callConv != ccInline and crossesCppBoundary(m, sym):
       header = "extern \"C\" " & header
     if sfPure in sym.flags and hasAttribute in CC[cCompiler].props: