Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!rutgers!lll-lcc!mordor!sri-spam!sri-unix!hplabs!cae780!tektronix!reed!nscpdc!joemu
From: joemu@nscpdc.NSC.COM (Joe Mueller)
Newsgroups: comp.sys.amiga
Subject: Re: Requesting requester advice
Message-ID: <814@nscpdc.NSC.COM>
Date: Tue, 13-Jan-87 12:33:32 EST
Article-I.D.: nscpdc.814
Posted: Tue Jan 13 12:33:32 1987
Date-Received: Wed, 14-Jan-87 02:40:34 EST
References: <1987Jan9.155019.8267@sq.uucp> <11276@sun.uucp>
Distribution: comp.sys.amiga
Organization: National Semiconductor, Portland Development Center, Portland, OR
Lines: 30
Summary: 3.03 bug?

In article <11276@sun.uucp>, cmcmanis@sun.uucp (Chuck McManis) writes:
> Hobie, do yourself and your customers a favor and upgrade to at least the
> 3.03 version of the compiler, preferably the 3.10 version. The 3.02 version
> has some serious bugs in it that cause pointer arithmetic to screw up
> royally and when building requesters you undoubtedly use *lots* of pointers.

I just blew a week of debugging time trying to track down what appears to be
a compiler bug in V3.03 of the Lattice compiler. I have a structure that
contains a pointer to a Window structure. My code then does some computations
based on the LeftEdge, TopEdge, Width, and Height of the window. I kept getting
the wrong answers. The code looked something like this:

if ( wind_desc->w_curx > (wind_desc->w_wind_ptr->Width - 4) ) {
	/* scroll line & set curx to LeftEdge */
}

I finally gave up and took the computation out of the conditional:
i.e.
	foo = wind_desc->w_wind_ptr->Width - 4;
	if (wind_sesc->w_curx > foo) {
		/* scroll line & set curx to LeftEdge */
	}

It then worked fine! Can someone at Commodore tell me if they are going to
update the developers with new 3.10 (or later) compilers (even for a fee)?
Do we need to contact Lattice individually? If we may get updated, when can
I do it and what will it cost?

					Joe Mueller
					...!nsc!nscpdc!joemu