1.5.12-1: ld (make) Error while compiling
Dave Korn
dave.korn@artimi.com
Wed Dec 15 16:05:00 GMT 2004
> -----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....
More information about the Cygwin-talk
mailing list