[Issue 14209] New: Duplicate Comdat with extern(C++)
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Feb 20 09:13:32 PST 2015
https://issues.dlang.org/show_bug.cgi?id=14209
Issue ID: 14209
Summary: Duplicate Comdat with extern(C++)
Product: D
Version: D2
Hardware: x86_64
OS: Windows
Status: NEW
Severity: normal
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: code at benjamin-thaut.de
The following code produces a duplicate comdat linker error on windows x64
template Signature(T)
{
alias Signature = typeof(T.init);
}
struct ezDelegate(T)
{
extern(C++) static DispatchDFunction()
{
}
};
extern(C++) void Test1(ezDelegate!(Signature!(void function())) )
{
}
int main()
{
ezDelegate!(Signature!(void function())) test;
return 0;
}
The error message is:
// fatal error LNK1179: invalid or corrupt file: duplicate COMDAT
'?DispatchDFunction@?$ezDelegate at P6AXXZ@@SAXXZ'
Removing any of the "exern(C++)" or the "typeof" will avoid the problem.
--
More information about the Digitalmars-d-bugs
mailing list