[llvm-bugs] [Bug 38124] New: Windows-specific entry points are not marked as extern C

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jul 10 14:45:06 PDT 2018


            Bug ID: 38124
           Summary: Windows-specific entry points are not marked as extern
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jacek at codeweavers.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org

When building using clang (not clang-cl) with mingw, entry points like wmain or
WinMain implemented in C++ are not found at link time. GCC just implicitly
marks wmain, WinMain, wWinMain and DllMain as extern "C":


clang also has logic for that in FunctionDecl::isMSVCRTEntryPoint, which is
used in MicrosoftMangleContextImpl::shouldMangleCXXName, but it's not applied
for mingw targets.

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/20180710/49bfc7ae/attachment.html>

More information about the llvm-bugs mailing list