Do non-trivial strictly conforming programs exist?

Doug Gwyn gwyn at smoke.BRL.MIL
Wed Sep 13 18:27:31 AEST 1989


In article <1989Sep12.164622.18909 at algor2.algorists.com> jeffrey at algor2.UUCP (Jeffrey Kegler) writes:
>In article <12570025 at hpclwjm.HP.COM> walter at hpclwjm.HP.COM (Walter Murray) writes:
>>With reference to the example in the basenote, a program can
>>be strictly conforming even though it contains TWO macro
>>definitions with 31 parameters in each, can't it?  
>No.  The implementation need execute only ONE program containing ONE
>instance of a 31 parameter macro.

Walter was correct.  The implementation is obliged to provide a
single example that it handles correctly and that stresses all the
minimum limits.  That definitely was the intent of the committee
as I recall the discussion at X3J11 meetings.  The constraints on
strict program conformance are different; as I recall the intent,
strict program conformance was supposed to mean that the program
does not violate any constraint of the standard and does not rely
on any behavior flagged as explicitly "implementation-dependent"
(using these terms in their loose English meanings here).  There
was not supposed to be any guaranteed that a strictly-conforming
program work properly on all conforming implementations, unlike
what 1.7 seems to be trying to guarantee.  It merely would have
the best chance that the Standard could provide of doing so.

>A conforming implementation can: ... as the Rationale says, make
>itself totally unusable in the above ways and a bunch of other ways.

Certainly it COULD be a useless piece of shit.  In which case,
the expectation is that it would not do well in the marketplace.
There are far too many C implementations for ones that exhibit
continued, severe deficiencies to survive.  The "Standard"
imprimatur is not intended to be a warranty of merchantability
or fitness for any particular purpose.  It merely lets you know
that you have the RIGHT TO EXPECT your carefully-coded portable
program to compile and execute with minimum hassle in such an
environment.  That's significantly better than the previous
state of the art.

>> But that doesn't excuse the implementation from accepting a program
>> which contains more than one such instance, does it?
>Absolutely, explicitly and intentionally.

Only "legally" (in the loose sense).  Morally, absolutely not!



More information about the Comp.std.c mailing list