-
Notifications
You must be signed in to change notification settings - Fork 162
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
Fix printing of unsigned integers #1896
Comments
So it needs a fix in the LLVM backend, and the fix basically requires keeping the value between This also needs some more fixes in LLVM because right now we treat
|
LLVM treats u8 and i8 the same. It's the same LLVM type. The u8(255) is exactly the same bit representation as i8(-1). So I think the only fix we have to do is in the visit_Print() to treat the u8 correctly. |
The fix I was suggesting not just only applies to print. If we fix just print there can be many other failures for the same reason. See the following:
This fails in LLVM but not in C because in LLVM |
The example you posted doesn't work: #1898. But assuming it "works", for now I would not allow unsigned integers in |
This prints:
But should print 255.
The text was updated successfully, but these errors were encountered: