[Issue 3211] Template mix-ins silently drop LinkageAttribute(s)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jul 29 01:48:28 PDT 2009


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


Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla at digitalmars.com
         Resolution|                            |INVALID




--- Comment #1 from Walter Bright <bugzilla at digitalmars.com>  2009-07-29 01:48:27 PDT ---
Simplifying the test case to:

template Test(string N)
{
   extern (C) void foo(int i, int j);
}

mixin Test!("abort");

void main()
{
  foo(1,2);
}

compiling and obj2asming the result, we see that foo() has the C calling
convention, but has the mangled name. The mangled name is necessary so that
different instances of the template won't collide. C mangling is only done for
module level globals.

This is as designed and is not a bug.

-- 
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