pure / const on function "return"ing an array?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a function with this prototype:

  void to_3d(hsize_t index, const hsize_t dims[3], hsize_t outdex[3]);

The effect of the function is to store appropriate values in the
"outdex" array.  It does not read or write global memory.

I would like to mark this as __attribute__((const)), but it doesn't
quite fit the definition, as it's a void function.  Obviously I can't
just change it to make `outdex' the return value, since outdex is an
array.

Is there anything else I could do in such a situation?

Thanks,

-tom


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux