[LLVMbugs] [Bug 15701] New: Clang fails to compile a program which calls inline function present in a header file

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Apr 8 05:46:02 PDT 2013


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: unassignedclangbugs at nondot.org
          Reporter: assie181 at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130408/eae91d22/attachment.html>


More information about the llvm-bugs mailing list