language cleanup: the .unchecked pragma is dead

This commit is contained in:
Araq 2018-11-05 14:53:04 +01:00 • committed by Andreas Rumpf
commit e71410d74e
8 changed files with 20 additions and 26 deletions

View file

@ -1019,8 +1019,10 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: var int,
else: incl(sym.typ.flags, tfIncompleteStruct)
of wUnchecked:
noVal(c, it)
if sym.typ == nil: invalidPragma(c, it)
else: incl(sym.typ.flags, tfUncheckedArray)
if sym.typ == nil or sym.typ.kind notin {tyArray, tyUncheckedArray}:
invalidPragma(c, it)
else:
sym.typ.kind = tyUncheckedArray
of wUnion:
noVal(c, it)
if sym.typ == nil: invalidPragma(c, it)