This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: can't build for z8k-coff


> If you didn't specify an option like -i on the build, then check which make
> you are using and if there are any updates available.  You can set up a small
> test case to reproduce the problem and if still present you should open a bug.

I'm using gmake 3.81. I didn't specify -i.
According to the man page of gmake return code 1 should only happen
if I specify -q, which I didn't. I will check with gmake 3.80 to see
if it happens there too.

> It is likely that I gummed this up when I brought the code in originally and
> modified it to work for newlib.  Obviously, this new code has never been
> compiled on the z8k.  I've made up a proposed patch to fix this. Try it out
> and let me know.

It works. But in order for the compile to succeed, I had to do another
change (appended).
It is also a variable declaration in the middle of a function.
I think there is no parameter to tell current gcc to report an error for
such things, even with -std=c89 :-(   This is very annoying...

regards,
chris

Index: ldtoa.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdlib/ldtoa.c,v
retrieving revision 1.11
diff -u -r1.11 ldtoa.c
--- ldtoa.c     16 May 2007 19:59:40 -0000      1.11
+++ ldtoa.c     6 Jun 2007 18:15:18 -0000
@@ -2868,9 +2868,6 @@
 LDPARMS rnd;
 LDPARMS *ldp = &rnd;
 
-rnd.rlast = -1;
-rnd.rndprc = NBITS;
-
 union uconv du;
 du.d = *d;
 #if LDBL_MANT_DIG == 24
@@ -2883,6 +2880,9 @@
 e113toe( &du.pe, e, ldp );
 #endif
 
+rnd.rlast = -1;
+rnd.rndprc = NBITS;
+
 if( (e[NE-1] & 0x7fff) == 0x7fff )
        {
 #ifdef NANS


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