digitalmars.D.bugs - [Issue 3034] New: Template instance name wrongly mangled as LName
- d-bugmail puremagic.com (44/44) May 28 2009 http://d.puremagic.com/issues/show_bug.cgi?id=3034
- d-bugmail puremagic.com (14/14) Jun 01 2009 http://d.puremagic.com/issues/show_bug.cgi?id=3034
http://d.puremagic.com/issues/show_bug.cgi?id=3034 Summary: Template instance name wrongly mangled as LName Product: D Version: 2.030 Platform: PC OS/Version: All Status: NEW Keywords: patch, wrong-code Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: rsinfu gmail.com Created an attachment (id=384) --> (http://d.puremagic.com/issues/attachment.cgi?id=384) Fix the problem (dmd 2.030) DMD wrongly mangles template instance name as LName, not TemplateInstanceName: -------------------- module test; template Temp() { struct S {} } pragma(msg, Temp!().S.mangleof); -------------------- S4test9__T4TempZ1S -------------------- In the above example, DMD mangles the template instance Temp!() to "9__T4TempZ". Note the preceding number. According to the spec, template instance name should be mangled without preceding number: -------------------- SymbolName: LName TemplateInstanceName LName: Number Name TemplateInstanceName: __T LName TemplateArgs Z -------------------- This prevents a name demangler from telling the difference between a usual identifier and template instance name. For example, a demangler can recognize "9__T4TempZ" as a valid module name, not a template instance. The proposed patch fixes mangle(Declaration *sthis) and TemplateInstance::mangle() (mangle.c). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 28 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3034 Shin Fujishiro <rsinfu gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- obsolete| | --- Created an attachment (id=387) --> (http://d.puremagic.com/issues/attachment.cgi?id=387) Fix the problem (DMD 2.030) I forgot to deal with TemplateMixin. It should be mangled as LName. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 01 2009