This commit is contained in:
parent
3e2d8c1c53
commit
745f1642d6
18 changed files with 906 additions and 236 deletions
|
|
@ -803,9 +803,11 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: var int,
|
|||
if sym.typ == nil: invalidPragma(c, it)
|
||||
var size = expectIntLit(c, it)
|
||||
if not isPowerOfTwo(size) or size <= 0 or size > 8:
|
||||
localError(c.config, it.info, "power of two expected")
|
||||
localError(c.config, it.info, "size may only be 1, 2, 4 or 8")
|
||||
else:
|
||||
sym.typ.size = size
|
||||
# TODO, this is not correct
|
||||
sym.typ.align = int16(size)
|
||||
of wNodecl:
|
||||
noVal(c, it)
|
||||
incl(sym.loc.flags, lfNoDecl)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue