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

           Summary: clang __gnu_inline__ semantics do not match gcc
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: OpenBSD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


int foo(void);

extern inline __attribute__((__gnu_inline__)) int
foo(void)
{
        return 5;
}

int
main(int argc, char *argv[])
{
        foo();
        return (0);
}

will cause a symbol to be generated with clang if the prototype aka "int
foo(void);" is present.

ie
# nm foo.o
00000000 T foo
00000000 F foo.c
00000020 T main

if the prototype isn't present then a symbol isn't generated.
# nm foo.o 
         U foo
00000000 F foo.c
00000000 T main

gcc 4.2.4 will apparently never create a symbol in both cases:
# nm foo.o 
         U foo
00000000 F foo.c
00000000 T main


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- 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