-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Sometimes casting between I32's and I64's can explode. Or give a very wrong number.
To Reproduce
This might have been fixed so is difficult/impossible to reproduce. Typically it occurs when a function argument is a different integer size from the integer being passed into the called function.
Example Program
U0 PrintInt(U16 x)
{
"%d\n";
}
U0 Main()
{
I64 d = 34;
PrintInt(d); // prints an extremely large negative number
}
Expected behavior
A C
-like integer conversion should happen. This is a bit vague but boils down to "do what C does" which then leads to C
-like behaviour than something completely unexpected which is what happens now.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working