https://issues.dlang.org/show_bug.cgi?id=14591
Iain Buclaw <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |[email protected] --- Comment #2 from Iain Buclaw <[email protected]> --- I think this has been fixed by clarifying the spec in dlang.org/#1511: https://github.com/dlang/dlang.org/commit/6230e592c983ae742ac5ebae8db060748eb08fb8#diff-7bd92f948c3c1d8d0d16a465bb464b99L241 There's ambiguity without this distinction in the grammar. Furthermore, if that wasn't enough, dlang.org/#1626 puts any further ambiguity to rest. https://github.com/dlang/dlang.org/pull/1626 The binutils D demangler was implemented according to the current spec of the time 2/3 years ago, and so does the following: --- if (ISDIGIT (*mangled)) mangled = dlang_parse_symbol (decl, mangled); else if (strncmp (mangled, "_D", 2) == 0) { mangled += 2; mangled = dlang_parse_symbol (decl, mangled); } --- With the updated spec now in, I think the corrective action on my side is to separate the handling of MangleName, QualifiedName, and SymbolName into different functions, so that the above becomes: --- if (ISDIGIT (*mangled)) mangled = dlang_parse_symbol (decl, mangled); else if (strncmp (mangled, "_D", 2) == 0) mangled = dlang_parse_mangle (decl, mangled); --- --
