[LLVMbugs] [Bug 19902] New: Clang-cl gives 'definition of dllimport static field not allowed' while cl does not
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri May 30 14:37:18 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19902
Bug ID: 19902
Summary: Clang-cl gives 'definition of dllimport static field
not allowed' while cl does not
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: jmuizelaar at mozilla.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Building this program with clang-cl gives a 'definition of dllimport static
field not allowed'. cl.exe accepts it
template <class> class A {
public:
__declspec(dllimport) static int b;
};
template <class _Elem> int A<_Elem>::b;
#if 0
A<int> k;
int o()
{ return k.b; }
#endif
However, if you change the #if 0 to #if 1 then cl.exe will complain about
inconsistent linkage.
This test case is a reduced version of the preprocessed output from
#include <string>
int main()
{
}
in bug 19150
--
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/20140530/2279d76a/attachment.html>
More information about the llvm-bugs
mailing list