Bug 5956 – Undocumented mangling of struct value

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-05-08T07:38:00Z
Last change time
2012-01-20T22:03:06Z
Keywords
spec
Assigned to
nobody
Creator
kennytm

Comments

Comment #0 by kennytm — 2011-05-08T07:38:22Z
Consider the program: ---------------------------------------- module y; template fffff(alias s) { void fffff() { } } struct U { int v; } void main() { fffff!( U(4) )(); } ---------------------------------------- The mangled symbol of fffff!( U(4) ) is: _D1y20__T5fffffVS1y1US1i4Z5fffffFZv which means _D (MangledName) 1y (LName: y) 20__T (TemplateInstanceName) 5fffff (LName: fffff) V (TemplateArg: value) S (TypeStruct) 1y (LName: y) 1U (LName: U) S1 (***UNDOCUMENTED*** struct value with 1 argument) i4 (integer: 4) Z (end of TemplateInstanceName) 5fffff (LName: fffff) FZv (TypeFunction: void _()) Above, the mangling Value: 'S' Number Value... is not documented at all. The D spec should mention it. (Also, the spec should also mention 'A Number Value...' can represent associative array literal as well.)
Comment #1 by kennytm — 2011-06-19T12:39:27Z
Comment #2 by kennytm — 2011-07-19T02:09:49Z