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: unassignedclangb...@nondot.org
          Reporter: ja...@codeweavers.com
                CC: dgre...@apple.com, llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to