Do non-trivial strictly conforming programs exist?

Jeffrey Kegler jeffrey at algor2.algorists.com
Sun Sep 17 15:18:39 AEST 1989


In article <425 at grenada.UUCP> rtm at grenada.UUCP (Richard Minner) writes:

>For example could not 2.2.4.1 be worded something like (not exactly,
>mind you):
>
>    2.2.4.1  Translation limits
>
>	     In so far as the implementation has sufficient
>	storage available, it shall be able to translate and
>	execute any otherwise conforming program that does not
>	exceed any of the following limits: 
>
>	o    (bunches of limits, reworded ever so slightly)
>

I would rather leave the present wording.  At least it comes straight
out and says "Jeffrey, if you want 100% portability of anything you
can just forget it.  Take a hike.  Go pound sand.  Forget it."  The
above says the same thing in a more equivocal way.  It would set me
looking through the standard (in vain) for definitions of
"sufficient", "storage", and "available".  I would a lot rather see
the standard explicitly refuse to give me what I want, than
equivocate.  With the explicit language, we all know what to expect.

One thing X3J11 did well is realize that writing a standard is more
like programming than writing English.  You have to assume you are
writing for a perversely logical audience.  If I was doing a
implementation, it was already done the wrong way, and a deadline on
which a lot of market share could hang was at stake, the only way I
could get them to change is quote chapter and verse and say, "thus
X3J11 sayeth".  Unless I could tell them "we will lose on proposals
because the competition will *prove* ours is not an ANSI C compiler,
as required in the RFP".  X3J11 took care of the pleas to implementors
to behave in the footnote and the Rationale, which is where such
things belong, if anywhere.

I do not think at this late date an attempt to amend a decision
deliberately made by X3J11 will succeed.  If I could (I believe it
is much too late) I would change 2.2.4.1 to a series of things like

    A conforming implementation must translate and execute any
    otherwise strictly conforming translation unit which contains no
    more than 1024 macro identifier definitions, provided that they
    are all declared with no more than 31 parameters and never invoked
    with more than 31 arguments.

In the above, if your program contains 1024 macros and does not
compile, the implementation loses.  If it contains 1025 and does not
compile, you lose.  One macro with 32 parameters, you lose.
-- 

Jeffrey Kegler, Independent UNIX Consultant, Algorists, Inc.
jeffrey at algor2.ALGORISTS.COM or uunet!algor2!jeffrey
1762 Wainwright DR, Reston VA 22090



More information about the Comp.std.c mailing list