Date: Sun, 9 Jun 2002 08:56:55 +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: <3D020C33.E455B6D6@phekda.freeserve.co.uk> 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 Sat, 8 Jun 2002, Richard Dawe wrote: > 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. It's possible that no one tested that program since before quoting changed in v2.01. > > > - 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.) That assumption holds because e and c are pointers to the same object.