You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: I'm fooling around with this software out of hobby interest applying it to some of my own old code. I'm not trying to convert any actual useful code base.
Software versions:
Arch Linux (rolling release distro).
glibc 2.37-2
clang 15.0.7-1
rustc 1.67.1 (from rustup)
c2rust 0.17.0 (from cargo install)
The text was updated successfully, but these errors were encountered:
I looked into this just now. We don't have handling for fpclassify, and this is blocked by lacking any way to refer to the C constants that it returns. FP categories are not present in the libc crate, so it isn't clear how we could refer to them in transpiled code in order to convert the result of the stdlib's f64::classify to them as the semantics of the surrounding C code would demand.
We might be able to convert calls to fpclassify naïvely, and also convert references to FP_INFINITE and friends to the corresponding Rust enum variants rather than the values they expand to in C, but this would break (likely very rare) code that relies on knowledge of the actual implementation-defined values of these macros (e.g. if (fpclassify(f) == 0) ...).
Trying to convert some code using
fpclassify
(from C99) yields:Unimplemented builtin __builtin_fpclassify
.Simple example that reproduces this
Note: I'm fooling around with this software out of hobby interest applying it to some of my own old code. I'm not trying to convert any actual useful code base.
Software versions:
The text was updated successfully, but these errors were encountered: