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

How bad are the rules for MSVC compared to the Itanium ones and would you consider adding support for it too?

Not that I have a use case in mind or anything, just curious.



Pretty bad, actually. There is no official documentation of the name mangling, so everything that is known is reverse engineered. In particular, there are outright bugs in the name mangling scheme, and one of the rules appears to rely on hashing the function body to produce a result. I'd give you examples, but, I don't have any of them on hand (I'm mostly relying on recollection from conversations with David Majnemer).


one of the rules appears to rely on hashing the function body to produce a result

Gross! I wonder what that's for. Somebody's hack to allow same-name/same-interface header inline functions to coexist?


The Microsoft name mangling scheme is explained in Agner Fog's PDF on calling conventions: http://www.agner.org/optimize/calling_conventions.pdf


That's really only a fraction of it. The only definitive documentation that I know of is clang's implementation of its mangling scheme: https://github.com/llvm-mirror/clang/blob/master/lib/AST/Mic...




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

Search: