[LLVMbugs] [Bug 23308] New: clang-cl errors about internal linkage on method in dllexported class that takes parameter with internal linkage

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Apr 21 19:19:41 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23308

            Bug ID: 23308
           Summary: clang-cl errors about internal linkage on method in
                    dllexported class that takes parameter with internal
                    linkage
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: hans at chromium.org
                CC: llvmbugs at cs.uiuc.edu, nicolasweber at gmx.de
    Classification: Unclassified

For example:

$ cat | bin/clang-cl /c /Tp -
namespace { struct T { }; }

struct __declspec(dllexport) S {
  void foo(T &t);
};

void S::foo(T &t) { };
<stdin>(7,9) :  error: 'S::foo' must have external linkage when declared
'dllexport'
void S::foo(T &t) { };
        ^
1 error generated.


Since T is in an anonymous namespace, S::foo gets internal linkage, and Clang
errors when trying to dllexport it.

-- 
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/20150422/cc4f2503/attachment.html>


More information about the llvm-bugs mailing list