http://llvm.org/bugs/show_bug.cgi?id=16766

            Bug ID: 16766
           Summary: clang with -fms-extensions should treat __inline in C
                    as it treats inline in C++
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

The MSDN docs spell this out:
http://msdn.microsoft.com/en-us/library/z8y1yy88.aspx

"The inline keyword is available only in C++. The __inline and __forceinline
keywords are available in both C and C++."
...
"The __inline keyword is equivalent to inline."

In particular, this code similar to some in winnt.h will cause multiple
definition link errors:
int foo(int);
__inline int foo(int x) { return x; }

Clang will emit a strong definition for foo instead of a weak or linkonce
definition.

This prevents clang from compiling and linking multiple C files that include
windows.h.

I don't think this will break people following C99 inline rules, but it will
cause them to start emitting more linkonce code.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to