delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/06/09/02:16:37

Date: Sun, 9 Jun 2002 08:56:55 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
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: <Pine.SUN.3.91.1020609085519.12685P-100000@is>
MIME-Version: 1.0
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

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019