Skip to content

Compiler should take more care about literal representation #1252

Closed
@marijnh

Description

@marijnh

Literals should probably be represented in high-precision, with literal arithmetic evaluated outside of LLVM, and only the result used as an LLVM constant.

Currently lit_int is represented by an int, making -2147483648 (or the 64-bit equivalent) lossy. The machine ints are all represented by int. For u32, i64, and u64, this is not enough. For i32, the problem mentioned above still comes up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions