[LLVMbugs] [Bug 22840] New: MS ABI: dllexport default closure constructor
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Mar 7 17:33:10 PST 2015
http://llvm.org/bugs/show_bug.cgi?id=22840
Bug ID: 22840
Summary: MS ABI: dllexport default closure constructor
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: david.majnemer at gmail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
consider:
struct __declspec(dllimport) S { S(int = 3) {} };
void f() {
S s[5];
}
compiling with MSVC 2013 or 2015 yields a reference to __imp_??_FS@@QEAAXXZ
which is the default constructor closure. The default constructor closure
evaluates all the default arguments and then calls the default constructor.
Wrapping it this way makes it possible to call the "vector constructor
iterator" which MSVC employs as a code-size optimization.
If you change the dllimport to dllexport and compile with clang, no default
constructor is emitted and thus our program will not link.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150308/19f2d05b/attachment.html>
More information about the llvm-bugs
mailing list