machine generated code and chatty compilers
Bill Smith
wsmith at mdbs.UUCP
Fri Jan 5 06:33:21 AEST 1990
For those helpful souls that wish their C or C++ compiler to generate
helpful warning messages in contexts that are technically correct, I
have another argument that that is inherently a bad idea.
People are not the only entities that generate code for C or C++ compilers.
It is often very useful for a program to generate code in second phase
By doing this, development time for an application is reduced.
If it is convenient for the pre-processor to generate code that is in a
pattern that is a mistake when done by humans, any warnings in such
context will render the rest of the compiler's error checking useless.
(What happens is the compiler generates hundreds of warnings that get
redirected to /dev/null along with any useful and deserved errors that
were generated.)
As a side note, I think one can show that if you had a fortran program
that generated a second fortran program, the two pass execution model
would have equivalent power to any recursive language. In other words,
one could guarantee that the generated fortran program would never
has stack overflow, which one could not guarantee in a single fortran
program. :-)
Bill Smith
pur-ee!mdbs!wsmith
(not my employer's opinions)
More information about the Comp.lang.c
mailing list