Skip to content

Incomplete __float128 support: cast from long double fails. #1583

@lynae99

Description

@lynae99

C2Rust appears to support __float128 / Float128 at the type-mapping level (e.g., mapping LongDouble | Float128 to an f128 type), but initialization via cast from long double fails with a translation error.
Reproducer

#include <float.h>

int main(void) {
    __float128 f128_1 = 1.0L;
    return 0;
}

Observed
C2Rust fails to translate main with an error similar to:

Failed to translate main: Tried casting long double to unsupported type: Float128

Environment

  • c2rust version: v0.21.0
  • platform:Ubuntu 24.04

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