Skip to content
This repository has been archived by the owner on Apr 25, 2021. It is now read-only.

Safe integer sign casting support #12

Open
AjaniBilby opened this issue Jul 18, 2020 · 1 comment
Open

Safe integer sign casting support #12

AjaniBilby opened this issue Jul 18, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@AjaniBilby
Copy link
Member

Currently, no way to cast between unsigned and signed integers due to lack of support for single instruction operation in LLVM.

This needs to be implemented correctly meaning that i8(-3) != u8(253). Instead u8( i8(-3) ) == 0

@AjaniBilby AjaniBilby added the enhancement New feature or request label Jul 18, 2020
@AjaniBilby AjaniBilby self-assigned this Jul 18, 2020
@AjaniBilby
Copy link
Member Author

Conversion is now possible via static_cast however it is not safe meaning that it allows for integer underflow

@AjaniBilby AjaniBilby removed their assignment Jul 29, 2020
@AjaniBilby AjaniBilby changed the title Integer sign casting support Safe integer sign casting support Jul 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant