www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - when would a mangle name be prefixed with "d" ?

reply davidl <davidl 126.com> writes:
when would a mangle name be prefixed with "d" ?
it's weird my app compiles and runs without -version=3DDEBUG
few version(DEBUG) in my app.
and with -version=3DDEBUG the source compiles, while linker emits
  Error 42: Symbol Undefined  =

_D7dparser3dmd5Lexer5Lexer6numberMFPS7dparser3dmd5Token5TokenZE7dparser3=
dmd6Tokens3TOK5FLAGS6__initZ

take a look into the obj file, i find the symbol is mangled as

d_D7dparser3dmd5Lexer5Lexer6numberMFPS7dparser3dmd5Token5TokenZE7dparser=
3dmd6Tokens3TOK5FLAGS6__initZ

an extra d prefixed, any idea?
May 21 2007
parent davidl <davidl 126.com> writes:
the mangle name only get 'd' prefixed when i have
default:
//    version(DEBUG) writefln(`hello`); // uncomment this would result bad  
mangle name
     assert(0);

while i didn't manage to have a smaller case reproduce it.

 when would a mangle name be prefixed with "d" ?
 it's weird my app compiles and runs without -version=DEBUG
 few version(DEBUG) in my app.
 and with -version=DEBUG the source compiles, while linker emits
   Error 42: Symbol Undefined  
 _D7dparser3dmd5Lexer5Lexer6numberMFPS7dparser3dmd5Token5TokenZE7dparser3dmd6Tokens3TOK5FLAGS6__initZ

 take a look into the obj file, i find the symbol is mangled as

 d_D7dparser3dmd5Lexer5Lexer6numberMFPS7dparser3dmd5Token5TokenZE7dparser3dmd6Tokens3TOK5FLAGS6__initZ

 an extra d prefixed, any idea?
-- 使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/
May 22 2007