Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


The 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: