implements {.gcsafe.} enforcement as a pragma block

This commit is contained in:
Andreas Rumpf 2017-01-18 12:55:33 +01:00
commit 2f08fdf623
3 changed files with 27 additions and 16 deletions

View file

@ -1444,7 +1444,7 @@ proc semPragmaBlock(c: PContext, n: PNode): PNode =
for i in 0 .. <pragmaList.len:
case whichPragma(pragmaList.sons[i])
of wLine: setLine(result, pragmaList.sons[i].info)
of wLocks:
of wLocks, wGcSafe:
result = n
result.typ = n.sons[1].typ
of wNoRewrite: