bhenning@bhami.vnet.van-bc.UUCP (Bill Henning) (01/08/89)
I bought Lattice C V5.0 last thursday, and I thought I would relate some of
my experiences with it. Overall, I am impressed, and I do like it. However...
After painlessly installing the package on my hard drive, I thought I would
compile some C programs... this is when the trouble started. One of my
previous projects has been a cross-assembler for a microcontroller. Three of
the five modules produced a CXERR 26 in line 0 from LC2, which is a 'Temporary
save or restore error'. My guess is that the peep hole optimizer is getting
confused and removing the store of p's new value back into its variable.
After considerable (and judicious) use of '#ifdef FINDBUG...#endif" in a
binary search on the smallest of the files I was able to isolate the problem.
At the end of this message I've included a small code fragment that
illustrates the problem. LC2 cannot handle *p++ where p is declared as an
extern pointer to char. This is a serious and terrible bug. C code uses *p++
all over the place. Fortunately, most cases use it within the scope of a
single module or function (but my assembler used it across module boundaries,
with a .h file declaring it as an extern). I tried -b0, no dice. The only
solution I found was to separate it into two statements, and casting the
pointer to a long before incrementing it.
Before anyone thinks that I'm totally disgruntled with the compiler I
should note the following:
- the debugger is absolutely fantastic. Lattice deserves a pat on the
back for it.
- The inclusion of a profiler, lmk, and other utilities is commendable
- The manuals are excellent. Nicely layed out, nicely indexed. I am
also grateful for the library function compatibility/origin list
Great work John Toebes (sp?) and others! Now if only LC2 were fixed...
Here is the code illustrating the bug and workaround:
extern char ch;
extern char far *p;
#define BUG
void dummy() {
#ifdef BUG
ch = *p++;
#else /* and a temporary work-around
ch = *p;
(long)p++;
#endif
}
A couple of other minor gripes. When compiling some source with -b0 Blink
complained that it could not find cxovf and cxbrk. Fortunately the sources to
those functions were included, so it was trivial to compile them and add them
to lc.lib. Where is grep.lib?
--
##############################################################################
# Amiga // # UUCP: {alberta!ubc-vision,ubc-cs,uunet}!van-bc!bhami!bhenning #
# 1000 // # -or- bhenning@bhami.wimsey.bc.ca /* untested at this time */ #
# // # -or- bhenning@bhami.van-bc.UUCP /* I prefer UUCP mail */ #
# \\ // # BITNET: USERCCPM@SFU.BITNET /* I rarely check for other mail */ #
# \X/bhami# ARPA: William_Henning%sfu@um.cc.umich.edu #
##############################################################################
riley@batcomputer.tn.cornell.edu (Daniel S. Riley) (01/09/89)
In article <2119@van-bc.UUCP> bhenning@bhami.vnet.van-bc.UUCP (Bill Henning) writes: > I bought Lattice C V5.0 last thursday, and I thought I would relate some of >my experiences with it. Overall, I am impressed, and I do like it. However... Lattice 5.0 is very impressive. It also has quite a few interesting bugs--not entirely surprising for a release this ambitious. Lattice is currently working on 5.01, which should be released in a week or two (hopefully this isn't the usual computer biz "two weeks"), which will be mailed to all registered 5.0 owners. So get those bug reports in NOW (if not sooner)! If you have not reported this bug to Lattice yet, please do so as soon as possible. Lattice V5 with the bugs wrung out should be awesome (and this is not a word I use lightly). I've been encouraged by Lattice's rapid response to the bugs in 5.00 that I've reported, so perhaps there is hope for 5.01. >Where is grep.lib? Someone forgot to put it on the distribution disk. Lattice knows about this, and will include it in 5.01. Note that I have NO connection with Lattice, except as a owner and user of their compiler. I am merely reporting what I have read on their bulletin board. -Dan Riley (dsr@lns61.tn.cornell.edu, cornell!batcomputer!riley) -Wilson Lab, Cornell U.
mapjilg@gdr.bath.ac.uk (J I L Gold) (11/10/89)
I'm having a few problems with my new Lattice C compiler. I realise I should get the V5.4 upgrade, but seeing as Lattice don't SEEM to have UK representatives that may take a while. In the meantime, I'm running it on an A500 with 1Meg with an external floppy (can't afford a hard disk at the mo). The "Hokey-cokey" compilation process ("You put the left one in, the right one out, you do the hokey-cokey and you shake it all about") seems to prevent me from optimising with lc -O .... I get "Command 'go' not found". GO is on disk #3 so I guess I should use some combination of assign and path. Maybe some of you out there can help? Also, V1.0(!?) of CodeProbe seems to crash more often than not, even when debugging the test program ftoc.c. To make life easy for myself, I put the source into RAM:, put disk #3 in df1:, type cd RAM: and then df1:c/cpr ftoc after compiling with the -d3 option. The debugger crashes when I execute the "go" (ie the run program) command. It also crashes when I do the same with the lines program, except it crashes when I step through the code and reach the OpenWindow(&nw) line. There's a guru for this crash which means illegal library call or something. Help on these matters would be much appreciated. Reply to newsgroup or email mapjilg@uk.ac.bath.gdr Cheers, Julian Gold.
walker@sas.UUCP (Doug Walker) (11/22/89)
Apologies for this weird posting, ut soe of the keys on y keyoard don't see to e working at all. In article <1989Nov10.143425.14184@gdt.bath.ac.uk> mapjilg@gdr.bath.ac.uk (J I L Gold) writes: >I'm having a few problems with my new Lattice C compiler. I realise I >should get the V5.4 upgrade, but seeing as Lattice don't SEEM to have >UK representatives that may take a while. In the meantime, I'm running You should have already reeived the upgrade free. In fat, European upgrades went out efore US ones did. > Also, V1.0(!?) of CodeProbe seems to crash more often than not, even Try setting your stak sie to 150000 ytes - there is a known ug. ***** *|_o_o|\\ Doug Walker, Software Distiller *|. o.| || | o |// "It is well to remember that evil is a pretty bad thing." ====== usenet: ...mcnc!rti!sas!walker plink: dwalker bix: djwalker