Closed
Description
You cannot pass an array to or return an array from a C function. f(char x[N])
is equivalent to f(char *x)
for every N. On x86_64 linux, the following two extern "C" functions produce the same assembly:
extern "C" {
fn f(x: [i32, ..4]); // void f(int x[4])
fn g(x: i64, y: i64);
}
This will segfault.