Trick to overload C functions

Here’s a little known trick, clang supports overloading of C functions using the overloadable attribute.

As an example, you could overload a function to compute the sine with a float, double, or long double:

You can read more about C function overloading in the clang language extensions documentation.