4 ms·
As I said, `add` function in C maps to a symbol named `add` in assembly. You're demangling the function name, which is what C++ does.
by fctorial 6y ago
As I said, `add` function in C maps to a symbol named `add` in assembly. You're demangling the function name, which is what C++ does.
- mjburgess 6y agoSure, you're right. I guess we'd need C to have a special syntax to compile in something like a vtable add_f32_f32(x, y) calls add(MAGIC_NO, x, y) and add has a big switch on MAGIC_NO for selecting implementation... You'd need a keyword for this, "multi int add(int a, int b) ..."
- jcelerier 6y agosuch complications where this is what C++ gives you natively