On Sunday 13 March 2005 16:31, Daniel Berlin wrote: > > bl operator<<.585 > > ^^^^^^^^^^^^^^^^^^^ > > You are using the demangled name instead of the mangled one, which is > where your problem comes from.
Right. But the mangled name is not available at this point. > Mark should be able to tell you how to get the mangled name instead of > the demangled one (though i thought it was just in either > DECL_ASSEMBLER_NAME or DECL_NAME). DECL_NAME is the unmangled name, DECL_ASSEMBLER_NAME will be the mangled name, once it is deterimed that the function has to be in the assembler output. But we haven't decided that when we're versioning. And mangle_decl returns the original name for the operator<<.number name. It appears we need some way to get a mangled name without setting DECL_ASSEMBLER_NAME on the method we are versioning. Actually, I'm not sure if using the mangled name makes any sense to begin with, because you can't unmangle anyway after you add the version suffix ;-) There is additional joy if you version the same method in the same way in multiple translation units. Because the ABI does not support versioning, you can't use the linkonce idea. Fun, versioning ;-) Gr. Steven