summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--compiler/cgen.nim2
-rw-r--r--lib/system.nim2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/cgen.nim b/compiler/cgen.nim
index 41f380d1b..112a2af34 100644
--- a/compiler/cgen.nim
+++ b/compiler/cgen.nim
@@ -967,11 +967,11 @@ proc genMainProc(m: BModule) =
     # functions, which might otherwise merge their stack frames.
     NimMainBody =
       "N_CDECL(void, NimMainInner)(void) {$N" &
-        "\tPreMain();$N" &
         "$1" &
       "}$N$N" &
       "N_CDECL(void, NimMain)(void) {$N" &
         "\tvoid (*volatile inner)();$N" &
+        "\tPreMain();$N" &
         "\tinner = NimMainInner;$N" &
         "$2" &
         "\t(*inner)();$N" &
diff --git a/lib/system.nim b/lib/system.nim
index 8ab3ee2e5..3bf65c695 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -2185,7 +2185,7 @@ when not defined(JS): #and not defined(NimrodVM):
     proc initStackBottomWith(locals: pointer) {.inline, compilerproc.} =
       # We need to keep initStackBottom around for now to avoid
       # bootstrapping problems.
-      when defined(setStackBottom):
+      when declared(setStackBottom):
         setStackBottom(locals)
 
     var