Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!iam.unibe.ch!metz From: metz@iam.unibe.ch (Igor Metz) Newsgroups: gnu.g++.bug Subject: inlining math.h functions on SUN3 Message-ID: <799*metz@iam.unibe.ch> Date: 10 Jul 89 10:31:03 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 53 There is a little bug in math.h as distributed with g++ 1.35.1-. It will include the asm inline code for math.h functions, but the code will instead use jsr _xxx !! You'll find the patch below. Igor Metz X400: metz@iam.unibe.ch Institut fuer Informatik ARPA: metz%iam.unibe.ch@relay.cs.net und angewandte Mathematik UUCP: ..!uunet!mcvax!iam.unibe.ch!metz Universitaet Bern Switzerland Phone: (+41) 31 65 49 02 *** /usr/local/lib/g++-include/math.h Tue Jun 13 14:05:25 1989 --- math.h Mon Jul 10 11:22:43 1989 *************** *** 48,53 **** --- 48,59 ---- overload tan; overload tanh; + #ifdef __HAVE_68881__ /* MC68881/2 Floating-Point Coprocessor */ + #include + /* Please add inline asm code for other machines here! */ + + #else + extern "C" { double acos(double); *************** *** 100,105 **** --- 106,113 ---- } + #endif /* __HAVE_68881__ */ + /* libg++ doesn't use this since it is not available on some systems */ /* the following ifdef is just for compiling OOPS */ *************** *** 180,188 **** #define PI2 M_PI_2 #endif - #ifdef __HAVE_68881__ /* MC68881/2 Floating-Point Coprocessor */ - #include - /* Please add inline asm code for other machines here! */ - #endif #endif --- 188,192 ----