-
Notifications
You must be signed in to change notification settings - Fork 279
Known Limitations of Translation
Daniel Kolsoi edited this page Apr 16, 2019
·
19 revisions
This document is to track things that we know the translator can't handle, as well as things it probably won't ever handle.
- variadic function definitions (blocked by Rust language)
- preserving comments (WIP)
-
long double
and_Complex
types (partially blocked by Rust language) - GNU packed and aligned structs (blocked by Rust language: https://github.com/rust-lang/rust/issues/59154)
-
restrict
pointers (Rust has references) - inline assembly
- macros
- Non x86/64 SIMD function/types and x86/64 SIMD function/types which have no Rust equivalent
-
longjmp
/setjmp
Although there are LLVM intrinsics for these, it is unclear how these interact with Rust (esp. idiomatic Rust). - jumps into and out of statement expressions We support GNU C statement expressions, but we can not handle jumping into or out of these. Both entry and exit into the expression have to be through the usual fall-through evaluation of the expression.
- The translator itself requires the nightly listed here: https://github.com/immunant/c2rust/blob/master/rust-toolchain
- A subset of translated code requires nightly. This is tracked here: https://github.com/immunant/c2rust/issues/46
- LLVM 7 improves support for X86 intrinsics; if you are translating SIMD code, we recommend you use LLVM 7 or later.