sret

I'm returning structs from functions by passing a pointer to the pre-existing
struct as the first argument. However, I am not setting "sret" because there
are not yet any OCaml bindings for it. What am I missing out on?

Hi,

I'm returning structs from functions by passing a pointer to the pre-existing
struct as the first argument. However, I am not setting "sret" because there
are not yet any OCaml bindings for it. What am I missing out on?

sret exists to achieve ABI compliance, i.e. to achieve interoperability with
code compiled with other compilers. If you don't care about that, there's
not much point in setting sret attribute.

Ciao,

Duncan.