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
> 
> Could you suggest a work-around.   I can only think of modifying
> the Makefiles to add some option to the compile command.
> However, I was hoping you had a better solution.

I wrapped mathdef.h to prevent multiple inclusion from math.h and
complex.h.  This suggests an include hack is needed to fix the problem.
However, I havn't tried to work out the details.

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

2000-11-27  John David Anglin  <dave@hiauly1.hia.nrc.ca>

	* mathdef.h: Prevent multiple inclusion by math.h and complex.h.

--- mathdef.h.orig	Tue Sep  5 08:22:44 2000
+++ mathdef.h	Mon Nov 27 17:04:35 2000
@@ -16,6 +16,9 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _MATHDEF_H
+#define _MATHDEF_H
+
 #if !defined _MATH_H && !defined _COMPLEX_H
 # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
 #endif
@@ -43,3 +46,5 @@
 # define DECIMAL_DIG	18
 
 #endif	/* ISO C 9X */
+
+#endif  /* _MATHDEF_H */

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