[LLVMbugs] [Bug 17572] New: Problem with inline C functions in Apple LLVM in XCode 5
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Oct 14 07:31:46 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=17572
Bug ID: 17572
Summary: Problem with inline C functions in Apple LLVM in XCode
5
Product: clang
Version: unspecified
Hardware: PC
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: konevaanna2012 at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Dear Sirs!
My name is Anna. I am from Moscow, Russia.
I have read these article and question about the inline C functions in C99:
http://www.drdobbs.com/the-new-c-inline-functions/184401540 and
http://stackoverflow.com/questions/3514413/objective-c-inline-function-symbol-not-found.
So according to them I organized the program sources like that:
File Foo.h:
inline void foo()
{
printf("Hello, World\n");
}
File Foo.c:
extern inline void foo();
And the file main.m looks like this:
#import <Foundation/Foundation.h>
#include "Foo.h"
int main(int argc, const char * argv[])
{
foo();
// insert code here...
NSLog(@"Hello, World!");
return 0;
}
And before the last XCode 5.0 which contains the Apple LLVM 5.0 it was compiled
successfully. But with 5.0 version it fails and the linker produces the error
that a symbol "foo" is undefined.
So please tell me, how should I organize the source files now to make it
compile?
Best regards,
Anna.
--
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/20131014/939db86f/attachment.html>
More information about the llvm-bugs
mailing list