This is the mail archive of the libc-alpha@sources.redhat.com 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]

Re: CRIS port 5/8: sysdeps/cris


Hans-Peter Nilsson <hans-peter.nilsson@axis.com> writes:

> > From: Andreas Jaeger <aj@suse.de>
> > Date: 09 Apr 2001 18:45:00 +0200
> 
> > Hans-Peter Nilsson <hans-peter.nilsson@axis.com> writes:
> > 
> > > + # FIXME: This test seems generally bogus.  Wrong types in function calls
> > > + # and assumes FE_TONEAREST is defined.  Does it work somewhere?
> > > + # Presumably it does, so let's settle for filtering it out target-wise
> 
> > What?  The test works AFAIK on all platforms, I'm testing it daily on
> > ia32 and AFAIK it works also on ppc, alpha, x86-64,...
> 
> Which all define FE_TONEAREST, have FPU and their own fenv.h...

Ok, I changed the test.  Uli, what do you think of the appended patch?
According to ISO C99 FE_TONEAREST is optional.

> > If it fails, your <fenv.h> functions are broken.
> 
> The default in sysdep/generic/bits is broken?  Is it not usable
> as is for targets with no hardware floating point?  If so, I
> think it should say "#error" somewhere.
> 
> I'll have to revisit the statement about "wrong types in
> function calls" though; it might have been fixed or something.

If there are wrong types, then tell us about.  I'd like to have the
issues resolved and not hidden somehow.

Andreas


2001-04-10  Andreas Jaeger  <aj@suse.de>

	* math/test-fenv.c (initial_tests): Protect FE_TONEAREST declaration

============================================================
Index: math/test-fenv.c
--- math/test-fenv.c	2000/12/04 07:26:40	1.15
+++ math/test-fenv.c	2001/04/10 07:14:20
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Jaeger <aj@suse.de> and
    Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -640,8 +640,10 @@
 {
   test_exceptions ("Initially all exceptions should be cleared",
                    NO_EXC, 0);
+#ifdef FE_TONEAREST
   test_rounding ("Rounding direction should be initalized to nearest",
                  FE_TONEAREST);
+#endif
 }
 
 int


-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


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