CompuServe Messages

#C for the Amiga

    24-Nov-85 09:43:55
Sb: #42338-#C for the Amiga
Fm: GARY SARFF 70167,2216
To: Bob Kassouf 73256,2443
Hi, just barging in. I have Lattice C 3.02 and have been porting a large (500K+) C program to the Amiga. Lattice C 3.02 has some bugs, quirks that I have found, I left a message about it over on CBM-2000. Basically, if you have some variable say x declared float or double and say something like if (x==1.0) it will crash your amiga when you try to compile it. The 1.0 can be any floating point literal. Lattice doesn't handle unions well when passed as arguments to functions, when you try to access the fields you get garbage instead of the value that you passed. You can't initialize a variable with the address of another variable, procedure,structure etc, this is probably because the amiga requires all programs to be relocatable, what I have to do is write an initialization procedure called first thing from main() and assign the appropriate addresses at run-time. Type casts seem to cause actual conversions or at least modifications of values that are assigned, they should NOT do this. Say char *q; int *p; p=(int *) q; will force q to an even address to assign to p. Unix C does not work this way. Also fseek() does not extend a file if you seek past eof, like it does on unix, you actually have to write something to the file and then seek to where you want to go. All in all though, it works, just the compiler generates all kinds of warnings about the most trivial things, I just ignore them though. bye – Gary