C2Rust fails to transpile a valid C program that initializes a double using a braced scalar initializer.
In C, scalar initialization with braces is valid, and the following program should be accepted.
Reproducer
int main(void) {
double x = { 0.0 };
return 0;
}
Observed Behavior
C2Rust fails during translation with:
error: Failed to translate main: Init list not implemented for Double
It also still emits an incomplete Rust file:
pub fn main() {
unsafe { ::std::process::exit(main_0() as i32) }
}
where main_0 is missing.
Environment
- c2rust version: v0.21.0
- platform: Ubuntu 24.04
- Rust: nightly-2022-08-08
- Clang version: 17.0.6