[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Gcc 3.3.6 v 4.0.1



Hello Vincent, List,

What other GMP test fails besides t-printf. Just more test cases in that test? I ask because I just built an RPM of GMP (more to get a working SPEC file than anything else) and it was the only failing program thus far. I tested both under the default EasyMiNT Mintlib and then the current CVS Mintlib. Other failures were just stack related and easily fixed.

I have other problems with MPFR tests, but I have not dug into them yet.

Keith

On Mon, 2 Mar 2009, Vincent Rivière wrote:

Alan Hourihane wrote:
I think this should fix it.....
...
 init_obstream (FILE *stream, struct obstack *obstack)
 {
+  (void) obstack;
+
+  stream->__magic = _IOMAGIC;
   stream->__mode.__write = 1;
   stream->__mode.__read = 1;

Frank, Alan: thank you for your help. I have dug a lot around stdio, and I understood a lot of things.

I'm currently working on a patch for the MiNTLib, it fixes some gmp testcases, but not yet all of them. I hope it will be finished in a few days.

Alan, your patch was very good starting point.
The missing _IOMAGIC value was the first cause of failure. It can't work without it. But adding it is not enough.

I noticed a "bad smell": you added the following line:
(void) obstack;
to avoid compiler warnings about the unused parameter.
You're right, it isn't used. But it should !

After a lot of debugging, I went to the conclusion that the whole file obstream.c is totally broken, and cannot work in any case. I started to rewrite it completely, it is very similar to vasprintf.c, which is good.

I hope it will be ready soon (very boring work).

--
Vincent Rivière