Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site rlgvax.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!sdcsvax!sdcrdcf!hplabs!hao!seismo!rlgvax!guy From: guy@rlgvax.UUCP (Guy Harris) Newsgroups: net.unix-wizards,net.wanted Subject: Re: Words wanted on 68000 invalid operand challenge Message-ID: <181@rlgvax.UUCP> Date: Tue, 9-Oct-84 22:40:09 EDT Article-I.D.: rlgvax.181 Posted: Tue Oct 9 22:40:09 1984 Date-Received: Thu, 11-Oct-84 07:58:48 EDT References: <328@ncoast.UUCP> <192@sol1.UUCP> <4019@elsie.UUCP> Organization: CCI Office Systems Group, Reston, VA Lines: 42 Xref: 9905 4783 > Recent articles have noted that some 68000 C compilers produce bogus > "Invalid Operand" messages when compiling a program like: > > I'd appreciate it if some netnik could mail me a description of the class of > C language statements that cause problems so I can set up "lint" to > gripe about them. There are some things "lint" wasn't meant to do, and this is one of them. The 68000 C compilers that produce crap code on the above examples are based on the MIT C compiler; a fix to that compiler was posted to the net a while ago. It consists of adding one table entry to the code generation tables, and has fixed our much-modified MIT compiler as well as whatever compiler the original fixer was using. The solution to the problem isn't to twiddle "lint" to catch everything that could possibly cause a compiler to blow up, it's to GET THE COMPILER FIXED! I can provide a copy of the fix to anybody who wants it. This isn't appropriate for "lint", *even if there currently exist buggy compilers that that code might cause a problem on*. It's not "lint"s job to be aware of every bug in every C compiler out there. Companies which may use the MIT C compiler include: Computer Consoles, Inc. - that's us, but I fixed it in the current compiler a couple of weeks ago (current releases don't have the fix, the next one will) Plexus (somebody claims to have seen this problem on a Plexus) UniSoft (I believe they use the MIT compiler, but they may already have found the bug) I don't know whether Microsoft has replaced the MIT compiler with their own or not. If any of you out there work for a company using the MIT 68000 C compiler, test the above fragment and see if it produces code that tries to do a "movb" into an address register. If so, you've got the bug - mail me for a description of the fix. Guy Harris {seismo,ihnp4,allegra}!rlgvax!guy