This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Error when re-compiling libc


Fred Fish wrote:
> This problem can easily be reproduced with a stripped down copy of the preprocessed source:
>
>     $ 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)
>     {
>     }
>     $ gcc -c bug.i
>     $ gcc -std=gnu99 -c bug.i
>     bug.i:13: error: redefinition of â__signbitâ
>     bug.i:6: error: previous definition of â__signbitâ was here
>     $
>
> Note that the trigger is the -std=gnu99 option.  Not sure if this error is a bug
> in glibc sources or in support for gnu99.
>
> -Fred
>
>   
Hi Fred and thanks for the reply.
I found out a patch by Jakub Jelinek about the use of __extern_inline
and __extern_always_inline changes in gcc-4.3.0 (experimental) and
applying it the problem is solved.

Luca


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]