machine generated code and chatty compilers
Edwin Wiles
ewiles at netxdev.DHL.COM
Sat Jan 6 08:34:21 AEST 1990
In article <1471 at mdbs.UUCP> wsmith at mdbs.UUCP (Bill Smith) writes:
>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.
>....{edited for brevity}....
>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.
1) If it's a mistake for a human to do it, then it's a mistake for a
program to do it.
2) If it's not a mistake, then don't complain about it.
(Personally, I consider type-mismatches to be mistakes. Supposedly
"safe" mismatches have bitten me too often for me to 'ignore' them
without careful consideration, and even then I'll typecast rather
than leave a "mistake".)
3) Any program smart enough to write code should be smart enough to
avoid things such as type mismatches. If it isn't, then fix it!
"Who?... Me?... WHAT opinions?!?" | Edwin Wiles
Schedule: (n.) An ever changing nightmare. | NetExpress, Inc.
...!{hadron,sundc,pyrdc,uunet}!netxcom!ewiles | 1953 Gallows Rd. Suite 300
ewiles at iad-nxe.global-mis.DHL.COM | Vienna, VA 22182
More information about the Comp.lang.c
mailing list