[LLVMbugs] [Bug 24195] New: clang-cl should be compatible to cl.exe regarding extern C handling in namespaces

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jul 21 04:32:16 PDT 2015


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

            Bug ID: 24195
           Summary: clang-cl should be compatible to cl.exe regarding
                    extern C handling in namespaces
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: gjasny at googlemail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Hello,

I try to use libclang to parse some source files. But the error is also visible
in clang-cl (r242653 nightly build).

The error originates from boost interprocess headers which declare windows.h
functions different than windows.h. The error got a work-around in later boost
versions but unfortunately we are stuck with 1.50 for a while.

It boils down to Visual Studio Compiler accepting the following, but clang-cl
does not:

extern "C" void foo(int a);

namespace bar {
    extern "C" void foo(long b);
}

In the boost case the functions get pointers to different structures.

Could you modify clang to accept this oddity with enabled ms-extensions /
ms-compatibility like cl.exe does?

Thanks,
Gregor

-- 
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/20150721/460dd7ae/attachment.html>


More information about the llvm-bugs mailing list