[Issue 7024] New: inconsistent mangling of shared in extern(C++)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Nov 28 02:33:58 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=7024

           Summary: inconsistent mangling of shared in extern(C++)
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: dawg at dawgfoto.de


--- Comment #0 from dawg at dawgfoto.de 2011-11-28 02:32:50 PST ---
module fail;

extern(C++) void foo1(void*);
extern(C++) void bar1(shared void*);

pragma(msg, foo1.mangleof);
pragma(msg, bar1.mangleof); // shared is ignored here, because C++ doesn't have
shared, this make sense.

extern(C++) void foo2(void function(void*));
extern(C++) void bar2(void function(shared void*));

pragma(msg, foo2.mangleof);
pragma(msg, bar2.mangleof); // shared is ignored here, because C++ doesn't have
shared, this make sense.

extern(C++) void foo3(void function(void*), void*);
extern(C++) void bar3(void function(shared void*), void*);

pragma(msg, foo3.mangleof);
pragma(msg, bar3.mangleof); // shared generate a different mangling here.

extern(C++) void foo4(void function(void*), shared void*);
extern(C++) void bar4(void function(shared void*), shared void*);

pragma(msg, foo4.mangleof); // Same mangling as bar3.
pragma(msg, bar4.mangleof); // back to correct mangling (the one expected by
g++).

extern(C++) void foo5(void* function(void*), void*);
extern(C++) void bar5(void* function(shared void*), void*);

pragma(msg, foo5.mangleof);
pragma(msg, bar5.mangleof); // shared generate a different mangling here.

extern(C++) void foo6(void* function(void*), shared void*);
extern(C++) void bar6(void* function(shared void*), shared void*);

pragma(msg, foo6.mangleof); // shared generate a different mangling here.
pragma(msg, bar6.mangleof); // function pointer mangled as in bar5, but second
parameter get a "0" in the mangling that none of the mangling above had.

----

It is expected that shared be ignored as in the foo1/bar1 case.

filed on behalf of deadalnix.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list