[LLVMbugs] [Bug 20983] Inline procedure defined in the same module isn't found by the linker

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Sep 17 13:43:35 PDT 2014


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

Reid Kleckner <rnk at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |rnk at google.com
         Resolution|---                         |INVALID

--- Comment #1 from Reid Kleckner <rnk at google.com> ---
Clang defaults to C99, and gcc to C89 with gnu inline rules, which are
incompatible.

The program as written is ill-formed in C99 because it doesn't provide a strong
definition for setRGB. Simply add 'static' if setRGB is local to the TU or
redeclare it without inline after the definition if it is not.

This is a FAQ:
http://clang.llvm.org/compatibility.html#inline

-- 
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/20140917/44d04c7e/attachment.html>


More information about the llvm-bugs mailing list