Mail Archives: djgpp-workers/2002/06/08/10:34:06
Hello.
Eli Zaretskii wrote:
>
> On Wed, 29 May 2002, Richard Dawe wrote:
>
> > Here's the chunk of the patch for building DJGPP's tests with gcc 3.1.
>
> Thanks! Some comments below.
>
> > * stdarg.c - need to decide what to about __dj_va_rounded_size;
>
> We could do several things:
>
> - have __dj_va_rounded_size defined in stdarg.h even for GCC 3.x and
> later (the definition will never hurt anything);
>
> - define it in stdarg.c;
>
> - or use its definition directly in the code of stdarg.c.
I don't like the first idea. What if programs have things conditional on
__dj_va_rounded_size? It seems unlikely, I admit. But I don't think we should
define anything from DJGPP's va_list handling, when we're using GCC's built-in
va_list handling.
I prefer copying the definition from <stdarg.h> to stdarg.c. I'll do that, in
my next patch.
[snip]
> See below.
>
> > + res = system ("djecho"
> > +" William Safire's Rules for Writers:"
> > +""
> > +"Remember to never split an infinitive. The passive voice should never be used."
>
> It is IMHO better to leave the original text as a single string, and
> instead add \n\ at the end of each line.
OK.
BTW system2.c seems broken anyway. In my work area that has no gcc 3.1 patches
I get a 'mismatched quote', when I run the test under bash. A simple fix is to
quote the text and escape the single quotes.
> > - printf("bss scan from %p to %p, %lu bytes\n", c, e, e-c);
> > + printf("bss scan from %p to %p, %d bytes\n", c, e, (ptrdiff_t) (e-c));
>
> I'd suggest to leave %lu and cast e-c to size_t. Since we _know_ both e
> and c belong to the same object, e-c is really its size, not a difference
> between two arbitrary pointers.
[snip]
I disagree, since they *are* pointers. Casting to a size_t seems like adding
an unnecessary assumption to me. (The assumption is that e > c.)
I'll commit the changes to the other tests, that no-one has commented on:
tscanf.c, tsnprntf.c, tsnprntf2.c. I think they're uncontroversial. They are
to fix format strings to unsigned for displaying strlen()'s return value and a
stub for _doprnt() that should use a va_list in its declaration.
Bye, Rich =]
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
- Raw text -