Compiler error messages.

Jack Jansen jack at boring.uucp
Sun May 18 01:44:07 AEST 1986


>In article <baylor.643> peter at baylor.UUCP writes:
>>
>>On the other hand, I found VAX/VMS 'C' a real pain after UNIX because it
>>put all the error messages in this huge ugly listing instead of a brief
>>list so I could find them. Of course the stupid bloody editor that didn't
>>have a shell escape or any sort of facility for editing multiple files
>>didn't help. 
>

Hah! You thought that was bad? You should run the program
main() {
    foo(bar)
}
through the prime C compiler. It will say something along the
following lines:
    foo(bar);
	  ^
Error #274, Source file = c.c, line 2. Severity=Error Class=fixable.
Dear programm}ier. You seem to have used a variable called "bar"
in the above-mentioned line. However, you never told me what "bar" is.
In my infinite helpfulness, I've inserted a "static int bar" declaration
at the innermost level (this is, the innermost level at the time
of the fault). I should warn you that, even though I say that this
error is fixable, that this does not imply that I will hereafter
produce a runnable program. It merely means that I will continue to
look for more dumb mistakes, which will give me a chance to print more
of these polite and lengthy error messages. 

[I may have overdone the frasing a bit, but the idea is clear, I
hope].

Problem is, there's *nobody* who benefits from such an explanation.
Experienced user could do with
2: bar undefined
and novices probably don't have a clue what 'innermost levels'
and 'statics' are. 

-- 
	Jack Jansen, jack at mcvax.UUCP
	The shell is my oyster.



More information about the Comp.lang.c mailing list