C Compiler bugs

Karl Heuer karl at haddock.ISC.COM
Tue Jun 7 10:07:32 AEST 1988


In article <15202 at tut.cis.ohio-state.edu> lvc at tut.cis.ohio-state.edu (Lawrence V. Cipriani) writes:
>In article <4421 at haddock.ISC.COM> karl at haddock.ima.isc.com (Karl Heuer) writes:
>>In article <15085 at tut.cis.ohio-state.edu> lvc at tut.cis.ohio-state.edu (Lawrence V. Cipriani) writes:
>	...
>>>	struct blob { int a, b, c; } /* missing ; */
>>>	main(argc, argv) ...
>>Why should it be considered a "compiler bug" when a syntactically correct
>>program containing a user bug dumps core?  [Fix it in lint]
>
>It certainly would be appropriate for lint, but don't you think this is
>a stupid thing for a compiler to allow?

Yes, but the general problem of mismatched declarations requires cross-file
checking, which has traditionally been in the jurisdiction of lint.  At least
until type-checking loaders become popular.  Misdeclared main() is just one
instance of the problem.

>... also not every implementation of C is accompanied by lint.

I've said it before (usually in Pascal-vs-C discussions): a C compiler
consists of two parts, traditionally called cc and lint.  A vendor who doesn't
supply a lint equivalent is only selling half a C compiler.

Karl W. Z. Heuer (ima!haddock!karl or karl at haddock.isc.com), The Walking Lint



More information about the Comp.lang.c mailing list