Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Max line length (was Re: programming challenge ...) Message-ID: <9863@smoke.BRL.MIL> Date: 16 Mar 89 23:59:23 GMT References: <2102@jasper.UUCP> <207600017@s.cs.uiuc.edu> <9777@bloom-beacon.MIT.EDU> <1166@auspex.UUCP> <3072@nunki.usc.edu> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 54 In article <3072@nunki.usc.edu> jeenglis@nunki.usc.edu (Joe English) writes: -> The implementation shall be able to translate and execute at -> least one program that contains at least one instance of every - ^^^^^ ^^^ ^^^^^^^ -> one of the following limits: -Huh? Now I'm probably reading this wrong, but the way I -parse this sentence it means: - If (there exists a program P such that - ( (for all L in {following limits} P contains an instance of L) - and (the implementation can deal with P) - ) - ) - then the implementation is in compliance with section 2.2.4.1. Right. -Shouldn't it say instead: - If (for all programs P such that - (there exists an L in {following limits} such that P contains L) - the implementation can handle P - ) - then the implementation is in compliance with section 2.2.4.1? Nope. If a program pushes all the limits simultaneously, an implementation that dynamically allocates resources might be unable to translate the program, yet still be perfectly usable for the vast majority of programs. -Put simply, if I write a compiler that will correctly -translate and execute *one* program that contains a 509-character -line, a 31-character identifier, and so on, but barfs -on all other programs, does that pass 2.2.4.1? Yes. Here's the relevant text from the Rationale for Section 2.2.4.1: The Standard requires that an implementation be able to translate and compile some program that meets each of the stated limits. This criterion was felt to give a useful latitude to the implementor in meeting these limits. While a deficient implementation could probably contrive a program that meets this requirement, yet still succeed in being useless, the Committee felt that such ingenuity would probably require more work than making something useful. The sense of the Committee is that implementors should not construe the translation limits as the values of hard-wired parameters, but rather as a set of criteria by which an implementation will be judged. Some of the limits chosen represent interesting compromises. The goal was to allow reasonably large portable programs to be written, without placing excessive burdens on reasonably small implementations.