32 bit fixes (#10608)
This commit is contained in:
parent
304b1dd34b
commit
28394153ab
26 changed files with 165 additions and 135 deletions
|
|
@ -353,9 +353,17 @@ proc magicsAfterOverloadResolution(c: PContext, n: PNode,
|
|||
localError(c.config, n.info, "cannot evaluate 'sizeof' because its type is not defined completely, type: " & n[1].typ.typeToString)
|
||||
result = n
|
||||
of mAlignOf:
|
||||
result = newIntNode(nkIntLit, getAlign(c.config, n[1].typ))
|
||||
result.info = n.info
|
||||
result.typ = n.typ
|
||||
# this is 100% analog to mSizeOf, could be made more dry.
|
||||
let align = getAlign(c.config, n[1].typ)
|
||||
if align == szUnknownSize:
|
||||
result = n
|
||||
elif align >= 0:
|
||||
result = newIntNode(nkIntLit, align)
|
||||
result.info = n.info
|
||||
result.typ = n.typ
|
||||
else:
|
||||
localError(c.config, n.info, "cannot evaluate 'alignof' because its type is not defined completely, type: " & n[1].typ.typeToString)
|
||||
result = n
|
||||
of mOffsetOf:
|
||||
var dotExpr: PNode
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue