diff options
author | def <dennis@felsin9.de> | 2015-05-05 20:24:54 +0200 |
---|---|---|
committer | def <dennis@felsin9.de> | 2015-05-05 20:26:54 +0200 |
commit | c5db4fc3a27b17cc20fc13de0a325c126e612c16 (patch) | |
tree | 8a9b55c47cd4e428f3110e9d77d27f26f07e8794 /tests/manyloc/standalone | |
parent | a9fe618756304a765006a54b3f8f8b1cdae0ffb9 (diff) | |
download | Nim-c5db4fc3a27b17cc20fc13de0a325c126e612c16.tar.gz |
Move the noreturn pragma to sysFatal
Now you can choose to implement sysFatal with --os:standalone so that it returns.
Diffstat (limited to 'tests/manyloc/standalone')
-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.} |