[LLVMbugs] [Bug 4536] New: clang __gnu_inline__ semantics do not match gcc

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Jul 11 04:21:50 PDT 2009


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: unassignedbugs at nondot.org
        ReportedBy: jsg at openbsd.org
                CC: llvmbugs at cs.uiuc.edu


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.



More information about the llvm-bugs mailing list