-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Address char signedness differences in TestNSNumber #265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
so this applies to all distros of arm linux? IIRC Android claims signed char, but does ubuntu on arm do the same? |
Yes, Linux/arm defaults to unsigned chars too. |
I mean, on Ubuntu, of course. |
it might be a bit dangerous but I wonder if we could use |
I'm unsure that is the best strategy, @modocache tried to fix c_layout.sil in swift tests because of the same issue, he could comment if this would work. IMHO Int8 should be really signed and CChar should map to either Int8 or UInt8 depending on the underlying configuration, at the moment on Linux/arm there's no way to use a signed 8-bits data type. |
@jckarter commented on swiftlang/swift#1103 that platform-specific checks would be preferred to using |
hmm more the reason these should not be signed or unsigned and CChar instead (but we cannot change the type since that would constitute an API change from Foundation's perspective) |
Address char signedness differences in TestNSNumber
We could float the idea of making |
@jckarter What's interesting and a bit depressing is that at the SIL level, even CSignedChar is unsigned. I am trying to see why although, apparently, everything is correct and that should work in theory, even Clang generates signext for "signed char" correctly. |
Oh maybe I got it wrong, is SIL still using the typealias defined in CTypes? |
SIL should canonicalize away all typealiases. If |
No, that's fine, CSignedChar maps to Int8 as well, like CChar, I got confused because of the BuiltinMappedTypes.def :-) |
@jckarter @phausler @modocache Yesterday, I submitted an email to swift-evolution to open up this discussion. https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160222/011101.html |
… flags for sourcekit-lsp (swiftlang#265) * Add serverArguments extension configuration to allow setting flags for sourcekit-lsp
No description provided.