Skip to content

Warn or error on platform-specific integer conversions #2425

Description

@eholk

Code like

let i : i64 = 0;

will fail to compile on 32-bit machines, because the type int is 32-bits, but succeed on 64-bit builds because there int and i64 are the same. It'd be nice if the compiler could report cases where we're assuming particular sizes for int or uint so we don't get bit by cross-platform build failures later.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions