[LLVMbugs] [Bug 1736] New: Frontend incompatibility precluding use of llvm-gcc as a drop-in replacement of gcc

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Oct 19 04:51:07 PDT 2007


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

           Summary: Frontend incompatibility precluding use of llvm-gcc as a
                    drop-in replacement of gcc
           Product: cfe
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Basic
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: vda.linux at googlemail.com
                CC: llvmbugs at cs.uiuc.edu


Reduced testcase:

struct stat {};
struct stat64 {};
int fxstat(int n, int fd, struct stat *sb);
int fxstat64(int n, int fd, struct stat64 *sb);
extern int fstat(int fd, struct stat *buf) asm("fstat64");
extern inline int fstat(int fd, struct stat *sb) { return fxstat(3, fd, sb); }
extern inline int fstat64(int fd, struct stat64 *sb) { return fxstat64(3, fd,
sb); }

With llvm-gcc4.0-2.1:

gcc -fgnu89-inline -std=gnu99 -c testcase.c
    error:
    unrecognized command line option "-fgnu89-inline"
gcc -std=gnu99 -c testcase.c
    error:
    Assembler messages:
    /tmp/cc9R2Ci9.s:33: Error: symbol `fstat64' is already defined
gcc -c testcase.c
    ok


With gcc-4.2.1:

gcc -fgnu89-inline -std=gnu99 -c testcase.c
    ok
gcc -std=gnu99 -c testcase.c
    warning:
     C99 inline functions are not supported; using GNU89
gcc -c testcase.c
    ok


-- 
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