[swift-dev] NSXMLNode.swift: error: integer literal overflows when stored into Int

Eric Wing ewmailing at gmail.com
Fri Sep 16 18:37:11 CDT 2016


I'm trying to build Swift 3 for Raspberry Pi 2/armv7.

I'm currently hitting a compile error at:

Foundation/NSXMLNode.swift:86:351: error: integer literal '4293918720'
overflows when stored into 'Int'.

public static let nodePreserveAll = Options(rawValue:
Options([.nodePreserveNamespaceOrder, .nodePreserveAttributeOrder,
.nodePreserveEntities, .nodePreservePrefixes, .nodePreserveCDATA,
.nodePreserveEmptyElements, .nodePreserveQuotes,
.nodePreserveWhitespace, .nodePreserveDTD,
.nodePreserveCharacterReferences]).rawValue | UInt(bitPattern:
0xFFF00000))


I'm assuming this is probably related to the fact that the Pi2 (armv7)
is 32-bit, though I'm surprised this isn't already seen on iOS 32-bit.
What is the appropriate fix?

Thanks,
Eric


More information about the swift-dev mailing list