This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: CRIS port 5/8: sysdeps/cris
- To: aj at suse dot de
- Subject: Re: CRIS port 5/8: sysdeps/cris
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Date: Wed, 11 Apr 2001 01:24:03 +0200
- CC: hans-peter dot nilsson at axis dot com, libc-alpha at sources dot redhat dot com
> From: Andreas Jaeger <aj@suse.de>
> Date: 10 Apr 2001 09:16:47 +0200
> 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:
> > 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.
Thanks. I had no intent but to present this issue; I should
have done so before submitting the port but it slipped. Very
well, I've now had a second look. With your patch (needed but
not sufficient) I get:
test-fenv.c: In function `test_single_exception':
test-fenv.c:66: incompatible type for argument 1 of `fetestexcept'
test-fenv.c:76: incompatible type for argument 1 of `fetestexcept'
test-fenv.c: In function `set_single_exc':
test-fenv.c:179: incompatible type for argument 1 of `feraiseexcept'
test-fenv.c:184: incompatible type for argument 1 of `feclearexcept'
test-fenv.c:189: invalid operands to binary ^
test-fenv.c:190: incompatible type for argument 1 of `feraiseexcept'
test-fenv.c:195: incompatible type for argument 1 of `feclearexcept'
test-fenv.c: At top level:
test-fenv.c:63: warning: `test_single_exception' defined but not used
test-fenv.c:149: warning: `test_rounding' defined but not used
test-fenv.c:169: warning: `set_single_exc' defined but not used
test-fenv.c:605: warning: `fe_single_test' defined but not used
The test assumes fexcept_t is an integer type. Previous targets
will have no problem, because all target-specific fenv.h define
fexcept_t as an integer type. However,
sysdeps/generic/bits/fenv.h defines it as a struct. Here's a
patch that will fix that the easy way, and let the test-case
compile for me. Perhaps you prefer to fix the test not to make
the integer-type assumption, but I did not immediately see how
to do it that way, and I would believe the specific default type
of fexcept_t is not of general interest. Either way, I guess
you can repeat the problem by moving away bits/fenv.h for your
favorite target such that the default is used.
2001-04-11 Hans-Peter Nilsson <hp@axis.com>
* sysdeps/generic/bits/fenv.h (fexcept_t): Change default type
from struct to unsigned int.
Index: fenv.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/generic/bits/fenv.h,v
retrieving revision 1.5
diff -p -c -r1.5 fenv.h
*** fenv.h 2000/09/01 04:40:56 1.5
--- fenv.h 2001/04/10 23:09:29
***************
*** 1,4 ****
! /* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
--- 1,4 ----
! /* Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
***************
*** 42,53 ****
/* Type representing exception flags.
XXX Probably we should also include the signal handler here. */
! typedef struct
! {
! unsigned int __flags;
! }
! fexcept_t;
!
/* Type representing floating-point environment. */
typedef struct
--- 42,48 ----
/* Type representing exception flags.
XXX Probably we should also include the signal handler here. */
! typedef unsigned int fexcept_t;
/* Type representing floating-point environment. */
typedef struct
brgds, H-P