diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2015-05-08 02:08:32 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2015-05-08 02:08:32 +0200 |
commit | 9422dbf3374248cf8e1cd181897236187759d524 (patch) | |
tree | 2d07853975c56115687be614f5956ab953ba50fb /tests | |
parent | c384f05e49e0716cc99042491f65bcc7d415d4c3 (diff) | |
parent | 4a2a0894aee91fac027f9d0cce401bf5c9dc353b (diff) | |
download | Nim-9422dbf3374248cf8e1cd181897236187759d524.tar.gz |
Merge pull request #2657 from def-/noreturn
Pass noReturn pragma to C code.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/manyloc/standalone/panicoverride.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/manyloc/standalone/panicoverride.nim b/tests/manyloc/standalone/panicoverride.nim index efd2b21f9..d9b3f4388 100644 --- a/tests/manyloc/standalone/panicoverride.nim +++ b/tests/manyloc/standalone/panicoverride.nim @@ -7,13 +7,13 @@ proc exit(code: int) {.importc, header: "<stdlib.h>", cdecl.} proc rawoutput(s: string) = printf("%s\n", s) -proc panic(s: string) = +proc panic(s: string) {.noreturn.} = rawoutput(s) exit(1) # Alternatively we also could implement these 2 here: # -# template sysFatal(exceptn: typeDesc, message: string) -# template sysFatal(exceptn: typeDesc, message, arg: string) +# proc sysFatal(exceptn: typeDesc, message: string) {.noReturn.} +# proc sysFatal(exceptn: typeDesc, message, arg: string) {.noReturn.} {.pop.} |