Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!homxb!whuts!mtune!rutgers!ukma!uunet!mcvax!unido!rmi!kkaempf From: kkaempf@rmi.UUCP Newsgroups: comp.sys.amiga Subject: Lattice-C 4.0, undocumented features Message-ID: <789@rmi.UUCP> Date: Fri, 30-Oct-87 10:05:16 EST Article-I.D.: rmi.789 Posted: Fri Oct 30 10:05:16 1987 Date-Received: Tue, 3-Nov-87 02:09:02 EST Reply-To: kkaempf@rmi.UUCP (Klaus Kaempf) Organization: RMI Net, Aachen, W.Germany Lines: 72 Hi ! The following text comes from a friend of mine, who doesn't has access to the Net. You may send comments to me via E-Mail, I will pass them to him. Klaus Kaempf - - - - - - - - - After using my new Lattice C 4.0 (they did a great job!) for a few days, I found out some things that might be interesting for others as well: "-ce" on "LC1" will inhibit output of the source (de-manxify, same as LC3.10) in case of an error. Warning 96 won't be issued unless you specify "-cf". "-c+" will suppress warning 22. "#pragma syscall" uses address 4 as library base pointer. Using "sizeof(struct unknown)" still will not give you an error and "-ct" still does not work (both same as LC3.10). This can be fixed with the following patch: Change the word at offset $4751 from $2000 to $0000 (otherwise the compiler will override the option you choose) and the word at offset $4558 from $660A to $670A (so the compiler will behave unchanged if "-ct" is NOT specified, see page C-10, NOT 8-3). Both offsets are 16-bit-offsets! These modifications don't seem to have any side effects, but who knows? Now all undefined structs etc. will generate a warning (after the complete source has been processed, so the line number should be ignored). But now you will have to fix your Amiga include files cause these will use lots of pointers to undefined structs (remember the old 3.03 and its warnings if you did not include almost everything?). And now a bit of criticism (John Toebes, are you listening?): Give us back our address register variables! My favorite benchmark (a sieve) now runs about 15 secs instead of 9 secs under LC3.10 for the first million prime numbers (no output of course). At least offer an option the way Aztec does (+r) if not using small data (= base relative). And, by the way, I could not get the compiler to use A3 as register, only A2, meaning I got only a single address register left! And if I choose not to use "#pragma libcall/syscall" it should be possible to use A6 as either a register variable or the base register (now A4). In addition you should release documentation on the new object format (library indexing). You did so in the "read.me" to LC3.10 for the base relative addressing and usage of a well documented standard object format has always been the reason I preferred Lattice to Aztec (both are still great compilers and if I need "#asm" I use Aztec of course). The object format defined by MetaComCo had to be enhanced, but then, please tell us about these improvements. The preprocessor symbol "LATTICE_C" should be defined the way Turbo C (gee, what's that?) does it (version number) in addition to those (now undocumented) symbols (who wrote the manual?). And, by the way, "OMD" does not recognize "BCS". Goodbye for now, I hope this helped someone. Ralph Babel, Falkenweg 3, D-6204 Taunusstein, West-Germany. Sorry, no E-mail.