This is the mail archive of the
cygwin-talk@cygwin.com
mailing list for the cygwin project.
RE: 1.5.12-1: ld (make) Error while compiling
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'and in the next cubicle along is the guy who wrote the controlroom software for chernobyl....'" <cygwin-talk at cygwin dot com>
- Date: Wed, 15 Dec 2004 16:02:49 -0000
- Subject: RE: 1.5.12-1: ld (make) Error while compiling
- Reply-to: Talk Amongst Yourselves <cygwin-talk at cygwin dot com>
> -----Original Message-----
> From: cygwin-talk-owner On Behalf Of Corinna Vinschen
> Sent: 15 December 2004 16:01
> To: Talk Amongst Yourselves
> Subject: Re: 1.5.12-1: ld (make) Error while compiling
>
> On Dec 15 10:42, Christopher Faylor wrote:
> > "Oh. i is supposed to be 47 here and it's 48, so I'll just
> > subtract 1."
>
> That's just mad. The right way to fix it is of course to subtract 6
> so you get 42 which is *always* correct.
>
>
> Corinna
Hmm. Given that we don't know what value i might have when we enter, we
should calculate the amount to subtract at runtime rather than just write a
constant 6, so to be really robust, shouldn't we code this as....
int diff = (i - 42);
i = i - diff;
cheers,
DaveK
--
Can't think of a witty .sigline today....