[LLVMbugs] [Bug 20758] New: clang accepts new dll attributes on explicit instantiation of already instantiated templates
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Aug 26 19:09:06 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=20758
Bug ID: 20758
Summary: clang accepts new dll attributes on explicit
instantiation of already instantiated templates
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: hans at chromium.org
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Consider:
template <typename T> void f() {}
void foo() { f<int>(); }
template void __declspec(dllimport) f<int>();
or
template <typename T> struct S { void f() {} };
void bar(S<int> s) { s.f(); }
template struct __declspec(dllexport) S<int>;
Clang accepts the code, but the attribute doesn't have any effect since it's
applied too late.
I think this would be hard for us to handle, so we should warn and drop the
attribute.
--
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/20140827/1cd38db1/attachment.html>
More information about the llvm-bugs
mailing list