[Issue 14591] New: [SPEC] Ambiguity between extern(Pascal) and template value parameters

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat May 16 05:29:58 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14591

          Issue ID: 14591
           Summary: [SPEC] Ambiguity between extern(Pascal) and template
                    value parameters
           Product: D
           Version: D1 & D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: ibuclaw at gdcproject.org

It's impossible to tell when demangling a symbol whether a 'V' we have
encountered is for a extern(Pascal) calling convention or a template value
parameter.

Two examples:

_D8demangle32__T4testTS8demangle3fooVnnZ3barZ3bazFZv
_D8demangle27__T4testTS8demangle3fooVnnZ3bar3bazFZv


One should be demangled to:
demangle.test!(demangle.foo(none, none).bar).baz()

and the other to:
demangle.test!(demangle.foo, null).bar.baz()



Because of this, I suggest Pascal calling convention mangle symbol should be
changed to another symbol that is not shared with TemplateArgX (or even better,
we should remove Pascal entirely)

--


More information about the Digitalmars-d-bugs mailing list