NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-vax/41277: libc/gdtoa/hdtoa.c will not compile on vax with gcc 4.3.3
The following reply was made to PR port-vax/41277; it has been noted by GNATS.
From: christos%zoulas.com@localhost (Christos Zoulas)
To: gnats-bugs%NetBSD.org@localhost, port-vax-maintainer%netbsd.org@localhost,
gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Cc:
Subject: Re: port-vax/41277: libc/gdtoa/hdtoa.c will not compile on vax with
gcc 4.3.3
Date: Sat, 25 Apr 2009 10:13:15 -0400
On Apr 25, 3:30am, lidl%pix.net@localhost (lidl%pix.net@localhost) wrote:
-- Subject: port-vax/41277: libc/gdtoa/hdtoa.c will not compile on vax with g
| >Number: 41277
| >Category: port-vax
| >Synopsis: libc/gdtoa/hdtoa.c will not compile on vax with gcc 4.3.3
| >Confidential: no
| >Severity: serious
| >Priority: medium
| >Responsible: port-vax-maintainer
| >State: open
| >Class: sw-bug
| >Submitter-Id: net
| >Arrival-Date: Sat Apr 25 03:30:00 +0000 2009
| >Originator: Kurt Lidl
| >Release: netbsd-5
| >Organization:
| >Environment:
| cross-building for a vax, from a solaris x86 machine,
| using gcc 4.3.3
|
| >Description:
| Since I spent a bunch of time getting gcc 4.3.3 to run
| as a cross-compiler in the netbsd tree, I figured I'd
| see if it could work for something other than a coldfire.
|
| I picked the vax, since I know its support in gcc is,
| um, a little weak.
|
| Anyway:
|
| # compile libc/hdtoa.o
| /nbsd/vax-5/tools/bin/vax--netbsdelf-gcc -O1 -fgcse -fstrength-reduce
-fgcse-after-reload -Wall -Wstrict-prototypes -Wmissing-prototypes
-Wpointer-arith -Wno-sign-compare -Wno-traditional -Wa,--fatal-warnings
-Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra
-Wno-unused-parameter -std=gnu99 -Werror -pipe -fstack-protector
-Wstack-protector --param ssp-buffer-size=1 -D_LIBC -DLIBC_SCCS
-DSYSLIBC_SCCS -D_REENTRANT -DHESIOD -DINET6 -DNLS -DYP
-I/nbsd/nbsd-5/lib/libc/include -I/nbsd/nbsd-5/lib/libc -I. -I/nbsd/nbsd-5/sys
-I/nbsd/nbsd-5/lib/libc/compat/stdlib -I/nbsd/nbsd-5/lib/libc/compat/../stdlib
-I/nbsd/nbsd-5/lib/libc/../../common/lib/libc/quad
-I/nbsd/nbsd-5/lib/libc/../../common/lib/libc/string
-I/nbsd/nbsd-5/lib/libc/../../common/lib/libc/arch/vax/string
-D__DBINTERFACE_PRIVATE -I/nbsd/nbsd-5/libexec/ld.elf_so
-I/nbsd/nbsd-5/lib/libc/dlfcn -I/nbsd/nbsd-5/lib/libc/gdtoa -DNO_FENV_H
-I/nbsd/nbsd-5/lib/libc/arch/vax/gdtoa -DWITH_RUNE -I/nbsd/nbsd-5/l
i
b/
| libc -DPOSIX_MISTAKE -DCOMPAT__RES -DUSE_POLL -DPORTMAP -DWIDE_DOUBLE
-DALL_STATE -DUSG_COMPAT -D_FORTIFY_SOURCE=2 -nostdinc -isystem
/nbsd/vax-5/nbuild/usr/include -c /nbsd/nbsd-5/lib/libc/gdtoa/hdtoa.c -o
hdtoa.o
| cc1: warnings being treated as errors
| /nbsd/nbsd-5/lib/libc/gdtoa/hdtoa.c: In function '__hdtoa':
| /nbsd/nbsd-5/lib/libc/gdtoa/hdtoa.c:164: error: floating constant exceeds
range of 'double'
|
Perhaps something like this (I am just guessing).
christos
Index: hdtoa.c
===================================================================
RCS file: /cvsroot/src/lib/libc/gdtoa/hdtoa.c,v
retrieving revision 1.6
diff -u -u -r1.6 hdtoa.c
--- hdtoa.c 21 Mar 2008 23:13:48 -0000 1.6
+++ hdtoa.c 25 Apr 2009 14:12:32 -0000
@@ -161,8 +161,15 @@
*decpt = 1;
return (nrv_alloc("0", rve, 1));
case FP_SUBNORMAL:
+#ifdef __vax__
+ /* (DBL_MAX_EXP=127 / 2) + 2 = 65? */
+ u.dblu_d *= 0x1p65;
+ *decpt = u.dblu_dbl.dbl_exp - (65 + DBL_ADJ);
+#endif
+ /* (DBL_MAX_EXP=1024 / 2) + 2 = 514? */
u.dblu_d *= 0x1p514;
*decpt = u.dblu_dbl.dbl_exp - (514 + DBL_ADJ);
+#endif
break;
case FP_INFINITE:
*decpt = INT_MAX;
Home |
Main Index |
Thread Index |
Old Index