Pointer arithmetic

Doug Gwyn gwyn at smoke.brl.mil
Fri Jan 11 02:54:06 AEST 1991


In article <15486 at crdgw1.crd.ge.com> volpe at camelback.crd.ge.com (Christopher R Volpe) writes:
>In article <14794 at smoke.brl.mil>, gwyn at smoke.brl.mil (Doug Gwyn) writes:
>|>strictly conforming and thus the C implementation should NOT issue a
>|>diagnostic.
>I assume you mean "should NOT fail to generate correct code", right?
>It can, of course, issue a diagnostic if it's raining outside or if
>it's past 5:00pm on a Friday.               

No, I used the term "should not" advisedly.  A quality ANSI C implementation
should not generate "diagnostics" for a strictly conforming program that are
indistinguishable from the ones required by the standard to be generated for
violations of syntax rules and constraints.  Note that I did not say "must
not" (as in the sense that the implementation would not be standard
conforming if it did); however, customers have a reasonable right to expect
diagnostics to be useful, and spurious ones that announce errors where there
are none are an indication of poor product quality.  Some people might want
the option to generate "warnings" that are readily distinguishable from
"error" diagnostics, for example a la UNIX "lint -p"; in the absence of
other lint-like support this would be a helpful feature.  However, I would
hope that such warnings could be easily suppressed, since many legitimate
applications of C involve deliberate exploitation of specific features of an
implementation.  While I strongly discourage unnecessary implementation
dependency in application code, there are times when it really is needed.



More information about the Comp.lang.c mailing list