Is it possible to declare a function as pure or const (using the GCC attributes),
With return arguments ? (where an argument is used for a return value).
For example:
void mid_v3_v3v3(float r_out[3], v0[3], v1[3])
{
r_out[0] = (v0[0] + v1[0]) * 0.5f;
r_out[1] = (v0[1] + v1[1]) * 0.5f;
r_out[2] = (v0[2] + v1[2]) * 0.5f;
}
With the exception of r_out, this function is const, is there some way to tag an argument as a return value, but otherwise treat the function as const?
see: https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/Function-Attributes.html