3 ms·
Recommend `__attribute__((overloadable))` instead of _Generic. The former opts into C++ style name mangling, which is a bit of a mess in C, but interacts well w
by JonChesterfield 4y ago
Recommend `__attribute__((overloadable))` instead of _Generic. The former opts into C++ style name mangling, which is a bit of a mess in C, but interacts well with `static` as forwarding wrappers in a header. The latter is a ridiculous mess invented by the C committee.
- ablob 4y agoThe latter does not require any name mangling. Any function that is called, was first created by the programmer. You might not like it, but it certainly fits any C code that wants to interface with other languages. Furthermore, I could only find this feature in the clang-compiler and references to it outside of the online-docs in gcc.