Skip to content

Too big float to int cast results nonsense #17081

Open
@mvorisek

Description

@mvorisek

Description

repro: https://3v4l.org/0FJkO

I discovered this in library where big timeout was converted to milliseconds like $timeoutFloat * 1000 and later casted into integer which resulted very dangerous 0 without any warning.

I would expect some warning like https://3v4l.org/4C3ru when too big float is impossible to be casted meaningfully into int.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions