Skip to content

audit for downsizing casts of literals that should produce warnings #52

Description

@ExpHP

Things like takes_word_sized_value(0x10000) should produce a warning.

The reason they don't, as far as I can remember, is because for a long time, RawInstr did not have any Spans, so even if I wanted to check a value for being out of range, I wouldn't be able to generate a helpful diagnostic. That problem is solved now, but many places remain in the lowering code that simply do a cast of a user-supplied literal without checking value range. This will require some sort of audit.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions