[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


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

            Bug ID: 38124
           Summary: Windows-specific entry points are not marked as extern
                    C
           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":

https://github.com/gcc-mirror/gcc/commit/f9f68d3567c26e5324e8f365431cf1a0b13c26ef#diff-9fc0a55518658f06bb07fd3c9fd9352f

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