Skip to content

Fix printing of i8 and i16 integers in LLVM #1355

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

Merged
merged 6 commits into from
Dec 13, 2022

Conversation

czgdp1807
Copy link
Collaborator

@czgdp1807 czgdp1807 commented Dec 12, 2022

Closes #1337

In this PR,

from ltypes import i8, i16, i32, i64
u: i64 = i64(-18)
print(u)
x: i32 = i32(-18)
print(x)
y: i16 = i16(-18)
print(y)
z: i8 = i8(-18)
print(z)

Output

-18
-18
-18
-18

Also note #1356 is opened separately as its a parser issue.

Copy link
Contributor

@certik certik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

@czgdp1807 czgdp1807 merged commit 0a0d710 into lcompilers:main Dec 13, 2022
@czgdp1807 czgdp1807 deleted the fix_iprint branch December 13, 2022 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

i16 and i8 do not print negative values correctly
2 participants