fixes #569; C++ codegen works again

This commit is contained in:
Araq 2013-08-31 02:07:52 +02:00
commit 6cc06cd35d
5 changed files with 26 additions and 16 deletions

View file

@ -449,7 +449,7 @@ else:
# Used to traverse the stack and registers assuming
# that 'setjmp' will save registers in the C stack.
type PStackSlice = ptr array [0..7, pointer]
var registers: C_JmpBuf
var registers {.noinit.}: C_JmpBuf
if c_setjmp(registers) == 0'i32: # To fill the C stack with registers.
var max = cast[TAddress](gch.stackBottom)
var sp = cast[TAddress](addr(registers))