Words wanted on 68000 invalid operand challenge

Guy Harris guy at rlgvax.UUCP
Wed Oct 10 12:40:09 AEST 1984


> 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



More information about the Comp.unix.wizards mailing list