Skip to content

Incomplete __float128 support: __float128 literals panic #1584

@lynae99

Description

@lynae99

C2Rust appears to support __float128 / Float128 at the type-mapping level (e.g., mapping LongDouble | Float128 to an f128 type), but __float128 floating-point literals (e.g., 1.0Q / 1.0q) cause a panic during transpilation (Unsupported floating point literal type Float128).
Reproducer

#include <float.h>

int main(void) {
    __float128 f128_1 = 1.0q;  // also happens with 1.0Q
    return 0;
}

Observed
C2Rust panics during transpilation, e.g.:

thread 'main' panicked at 'Unsupported floating point literal 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