Mail Archives: djgpp-workers/2002/06/09/02:16:37
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 -