.noalias annotation; frontend support (#15419)
* .noalias annotation; frontend support * added .noalias support to Nim; implements https://github.com/nim-lang/RFCs/issues/204
This commit is contained in:
parent
453167a41e
commit
50b6f6996a
11 changed files with 53 additions and 12 deletions
8
tests/ccgbugs/tnoalias.nim
Normal file
8
tests/ccgbugs/tnoalias.nim
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
discard """
|
||||
ccodecheck: "\\i@'NIM_CHAR* NIM_NOALIAS x,' @'void* NIM_NOALIAS q'"
|
||||
"""
|
||||
|
||||
proc p(x {.noalias.}: openArray[char]) =
|
||||
var q {.noalias.}: pointer = unsafeAddr(x[0])
|
||||
|
||||
p "abc"
|
||||
Loading…
Add table
Add a link
Reference in a new issue