Re: register pragma

2017-01-21 Thread valex
Araq thanks. This nim code works: var x {.codegenDecl: "register $# $# asm(\"r12\")".}: int

Re: register pragma

2017-01-21 Thread Araq
Sure, instead of replying, edit your original message. If you don't want an answer, why not? `register int foo asm ("r12");` is not valid C, so that's why. But of course Nim has a solution for this: var x {.codegenDecl: "$# $# asm(\"r12\")".}: int

Re: register pragma

2017-01-20 Thread Stefan_Salewski
Have you tried something like var mycounter {.register.} = 0 You can check the C sources if it is applied, but as the manual says, in nearly all cases the (C) compiler knows better.

register pragma

2017-01-20 Thread valex
I didn't find examples of use register pragma. [http://nim-lang.org/docs/manual.html#pragmas-register-pragma](http://nim-lang.org/docs/manual.html#pragmas-register-pragma) Where it is possible to find more detail information (syntax of use) on it?