implemented optional pragma for implicit discard

This commit is contained in:
Araq 2011-09-24 13:55:24 +02:00
commit 72ceda98cb
11 changed files with 53 additions and 21 deletions

View file

@ -1761,7 +1761,7 @@ proc expr(p: BProc, e: PNode, d: var TLoc) =
if sfGlobal in sym.flags: genVarPrototype(p.module, sym)
if sym.loc.r == nil or sym.loc.t == nil:
InternalError(e.info, "expr: var not init " & sym.name.s)
if sfThreadVar in sym.flags:
if sfThread in sym.flags:
AccessThreadLocalVar(p, sym)
if emulatedThreadVars():
putIntoDest(p, d, sym.loc.t, con("NimTV->", sym.loc.r))