Mangling namespace std
Mangling namespace std
FreeBASIC seems to treat namespace std as any other namespace, mangling std::foobar to N3std6foobarE instead of St6foobar as gcc does. Is this by design? Placing the declaration inside an extern "C++" block doesn't effect the mangled name.
Re: Mangling namespace std
See this post : Re: Wiki improvements (third example)
Re: Mangling namespace std
fxm Sorry, that doesn't seem to answer the question. FreeBASIC follows (more or less) gcc's name mangling rules, except for namespace std, which impedes linking with the C++ library. This may be by design if there are compatibility issues between FreeBASIC and gcc, but otherwise I would think it's a bug.
P.S. I'm not trying to link with the C++ library but I am working on a demangler that translates mangled names to FreeBASIC syntax, unlike __cxa_demangle that translates to C++ syntax.
P.S. I'm not trying to link with the C++ library but I am working on a demangler that translates mangled names to FreeBASIC syntax, unlike __cxa_demangle that translates to C++ syntax.
Re: Mangling namespace std
freebasic does not reserve "std" for any special use, and there's no support for the std namespace mangling rules
But if std c++ name mangling were added, I would probably do like this for syntax:
Still nothing special about 'std', but tells fbc to mangle 'std' as 'St' ... plus other rules (probably)
But if std c++ name mangling were added, I would probably do like this for syntax:
Code: Select all
extern "c++"
namespace std alias "::std::"
'' declarations
end namespace
end extern