Files
Nim/tests/avr/panicoverride.nim

14 lines
308 B
Nim

proc printf(frmt: cstring) {.varargs, importc, header: "<stdio.h>", cdecl.}
proc exit(code: int) {.importc, header: "<stdlib.h>", cdecl.}
{.push stack_trace: off, profiler:off.}
proc rawoutput(s: string) =
printf("%s\n", s.cstring)
proc panic(s: string) {.noreturn.} =
rawoutput(s)
exit(1)
{.pop.}