[Bug c/30051] New: Current gcc gets error compiling glibc with -std=gnu99

fnf at specifixinc dot com gcc-bugzilla@gcc.gnu.org
Sat Dec 2 17:20:00 GMT 2006


A gcc built from the latest sources (as of 20061126) gets an error compiling
the latest glibc.  The compiler distributed with Fedora Core 6 (4.1.1) works.
Glibc cannot be built without -std=gnu99.

Here's how to reproduce using a stripped down test case from the glibc 
sources.

$ cat bug.i
extern int __signbit (double __value) __attribute__ ((__nothrow__))
     __attribute__ ((__const__));

extern __inline int
__attribute__ ((__nothrow__)) __signbit (double __x)
{
  __extension__ union { double __d; int __i[2]; } __u = { __d: __x };
  return __u.__i[1] < 0;
}

int
__signbit (double x)
{
}
$ /usr/bin/gcc -std=gnu99 -c bug.i
$ /usr/bin/gcc -v 2>&1 | grep version
gcc version 4.1.1 20061011 (Red Hat 4.1.1-30)
$ gcc -std=gnu99 -c bug.i
bug.i:13: error: redefinition of '__signbit'
bug.i:6: error: previous definition of '__signbit' was here
$ gcc -v 2>&1| grep 'gcc version'
gcc version 4.3.0 20061126 (experimental)
$


-- 
           Summary: Current gcc gets error compiling glibc with -std=gnu99
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: blocker
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: fnf at specifixinc dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30051



More information about the Gcc-bugs mailing list