* fixes #13122

* moved tests to where they belong
This commit is contained in:
Andreas Rumpf 2020-01-13 14:11:51 +01:00 • committed by GitHub
commit abea80376a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 9 deletions

View file

@ -819,12 +819,10 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: var int,
localError(c.config, it.info, "size may only be 1, 2, 4 or 8")
of wAlign:
let alignment = expectIntLit(c, it)
if alignment == 0:
discard
elif isPowerOfTwo(alignment):
if isPowerOfTwo(alignment) and alignment > 0:
sym.alignment = max(sym.alignment, alignment)
else:
localError(c.config, it.info, "power of two or 0 expected")
localError(c.config, it.info, "power of two expected")
of wNodecl:
noVal(c, it)
incl(sym.loc.flags, lfNoDecl)