This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

Re: `float_t' previously declared here


> /home/dave/gnu/gcc-2.97/objdir/gcc/xgcc -B/home/dave/gnu/gcc-2.97/objdir/gcc/ -B/usr/local/i686-pc-linux-gnu/bin/ -B/usr/local/i686-pc-linux-gnu/lib/ -isystem /usr/local/i686-pc-linux-gnu/include -DHAVE_CONFIG_H -I. -I../../../../libstdc++-v3/libmath -I.. -I../../../../libstdc++-v3/include -I../include -g -O3 -c ../../../../libstdc++-v3/libmath/c_logl.c  -fPIC -DPIC -o .libs/c_logl.o
> /usr/include/bits/mathdef.h:27: redefinition of `float_t'
> /usr/include/bits/mathdef.h:27: `float_t' previously declared here
> /usr/include/bits/mathdef.h:29: redefinition of `double_t'
> /usr/include/bits/mathdef.h:29: `double_t' previously declared here
> make[4]: *** [c_logl.lo] Error 1
> 
> It seems as if the redefinition is at the same point as the previous
> declaration.  However, I don't see how bits/mathdef.h could have been
> included twice.

This can happen if <math.h> then <complex.h> are included with __USE_ISOC9X
defined:

#if !defined _MATH_H && !defined _COMPLEX_H
# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
#endif

#if defined __USE_ISOC9X && defined _MATH_H
/* The ix87 FPUs evaluate all values in the 80 bit floating-point format
   which is also available for the user as `long double'.  Therefore we
   define:  */
typedef long double float_t;    /* `float' expressions are evaluated as
				   `long double'.  */
typedef long double double_t;   /* `double' expressions are evaluated as
				   `long double'.  */

This snipit is from the suse 6.3 bits/mathdef.h header.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

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