Skip to content

FCSR operations generally cannot be used from Rust #148

Closed
@RalfJung

Description

@RalfJung

This crate seems to provide operations that can change the floating-point rounding mode and read the accrued exceptions flags. These operations generally cannot be used soundly from Rust; see rust-lang/stdarch#1478 for more explanation.

It would be good to clarify in the documentation when and how exactly these functions are meant to be used. As things stand, calling set_rounding_mode() will be immediate UB in almost all contexts, and read().fflags() will return an unreliable value.

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