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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to