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

David Blaikie <dblai...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
                 CC|                            |dblai...@gmail.com
             Status|NEW                         |RESOLVED

--- Comment #1 from David Blaikie <dblai...@gmail.com> ---
I believe this is correct behavior for C99. GCC does the same thing:

$ cat inl.c
inline void foo() {
}
int main() {
  foo();
}
$ gcc inl.c -std=c99
/tmp/ccMjLRUx.o: In function `main':
inl.c:(.text+0xa): undefined reference to `foo'

I can't find the proper reference for it, but my understanding is that in C the
inlinable definition is potentially separate from the non-inlined definition (
https://gustedt.wordpress.com/2010/11/29/myth-and-reality-about-inline-in-c99/
discusses this with examples)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to