pragma(mangle, "name") suggestion !

Calvin P changlon at gmail.com
Thu Mar 19 04:59:14 UTC 2020


I intend use pragma(mangle, "name")   to avoid compiler generate 
extra long symbol name. but it not work nicely.


1:) it can not use with for function define inside a method.     
throw:  Error: unrecognized pragma(mangle)

I think if https://issues.dlang.org/show_bug.cgi?id=17638 get 
fixed will solve this problem.


2:) it can not use the enum value pass into the template.  for 
example:

===========
  pragma(mangle,  name ~ "_myAction")
void myAction(string name, ubyte[][] fields)(){


}
===========

I need this because the ubyte[][] fields is very big array,  the 
symbol length is like more than 2000. The  backtrace debug 
information is unable to reading even after demangle.


This kind change require DIPs?







More information about the Digitalmars-d mailing list