[llvm-bugs] [Bug 32989] New: DLL import/export and explicit instantiation
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed May 10 09:08:53 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=32989
Bug ID: 32989
Summary: DLL import/export and explicit instantiation
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: zahira.ammarguellat at intel.com
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
ksh-3.2$ cat test.cpp
struct I;
template<typename T> struct __declspec(dllimport) X {
void f(T *p) { p->i(); }
void f(); // f is now overloaded.
};
template void X<I>::f(I*);
ksh-3.2$
ksh-3.2$ which cl
c:/Program files (x86)/Microsoft Visual Studio 14.0/VC/BIN/amd64/cl.EXE
ksh-3.2$ cl -c -Zi test.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
test.cpp
ksh-3.2$ clang -v
clang version 5.0.0 (cfe/trunk 302180)
Target: x86_64-pc-windows-msvc
Thread model: posix
ksh-3.2$ clang -c -g test.cpp
test.cpp:3:19: error: member access into incomplete type 'I'
void f(T *p) { p->i(); }
^
test.cpp:6:21: note: in instantiation of member function 'X<I>::f' requested
here
template void X<I>::f(I*);
^
test.cpp:1:8: note: forward declaration of 'I'
struct I;
^
1 error generated.
ksh-3.2$
--
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/20170510/bffcbef1/attachment.html>
More information about the llvm-bugs
mailing list