Date: Thu, 30 May 2002 08:00:09 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Richard Dawe cc: djgpp-workers AT delorie DOT com Subject: Re: Patches for building with gcc 3.1 - tests chunk In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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. > * signals.c - is the typecasting valid? 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. > - 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. > - urand = ((double)rand()) / RAND_MAX; > + urand = ((double)(long)rand()) / RAND_MAX; I don't understand the need for this change. What's wrong with the original code, exactly?