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

            Bug ID: 15701
           Summary: Clang fails to compile a program which calls inline
                    function present in a header file
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

✗ cat check.h
inline void fun(int x) {
}

✗ cat check.c
#include "check.h"

int main(int argc, char **argv)
{
    fun(10);
    return 0;
}

✗ /usr/local/bin/clang check.c 
/tmp/check-UthCL9.o: In function `main':
check.c:(.text+0x1e): undefined reference to `fun'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

 ✗ /usr/local/bin/clang -v
clang version 3.3 (http://llvm.org/git/clang.git
efac8da4cfa49799d5fdbc9d10b0e9f9a53ff6c8) (http://llvm.org/git/llvm.git
59889f7f496f549965764820a0150c4068c02f5b)
Target: x86_64-unknown-linux-gnu
Thread model: posix

-- 
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