Skip to content

Fix printing of i8 and i16 integers in LLVM - #1355

Merged
czgdp1807 merged 6 commits into
lcompilers:mainfrom
czgdp1807:fix_iprint
Dec 13, 2022
Merged

Fix printing of i8 and i16 integers in LLVM#1355
czgdp1807 merged 6 commits into
lcompilers:mainfrom
czgdp1807:fix_iprint

Conversation

@czgdp1807

@czgdp1807 czgdp1807 commented Dec 12, 2022

Copy link
Copy Markdown
Collaborator

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.

@certik certik left a comment

Copy link
Copy Markdown
Contributor

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