karl@haddock.ima.isc.com (Karl Heuer) (03/30/89)
S1.7 of the pANS says "A strictly conforming program ... shall not exceed any minimum implementation limit". Does this include the limits in S2.2.4.1? I would think so, but the text refers only to the minimum quality of the implementation. Is a program still strictly conforming if it has more than 509 characters in a string literal? (And does that figure include the trailing null character, or not?) Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint
gwyn@smoke.BRL.MIL (Doug Gwyn ) (03/31/89)
In article <12208@haddock.ima.isc.com> karl@haddock.ima.isc.com (Karl Heuer) writes: >S1.7 of the pANS says "A strictly conforming program ... shall not exceed any >minimum implementation limit". Does this include the limits in S2.2.4.1? I >would think so, but the text refers only to the minimum quality of the >implementation. So that does qualify as a "minimum implementation limit", nicht wahr? See the introduction to 2.2.4. >Is a program still strictly conforming if it has more than >509 characters in a string literal? (And does that figure include the >trailing null character, or not?) No, such a program is not strictly conforming. That's directly derivable from what you quoted. I'm not sure what the committee intended the 509-character string literal limit to include. From the description in 3.1.4 I'd say that the appended zero byte isn't part of the 509 count.
scjones@sdrc.UUCP (Larry Jones) (03/31/89)
In article <12208@haddock.ima.isc.com>, karl@haddock.ima.isc.com (Karl Heuer) writes: > S1.7 of the pANS says "A strictly conforming program ... shall not exceed any > minimum implementation limit". Does this include the limits in S2.2.4.1? I > would think so, but the text refers only to the minimum quality of the > implementation. Is a program still strictly conforming if it has more than > 509 characters in a string literal? (And does that figure include the > trailing null character, or not?) > > Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint Yes, that does include the limits in S2.2.4.1 so a program with more that 509 characters in a string literal is not strictly conforming (and that blows away my entry in the Portable Self Replicating C Code Contest - I forgot about that limit). As to whether to count the null or not, it isn't clear, but I don't think so. In S3.1.4 it says that "In translation phase 7, a byte or code of value zero is appended to each multibyte character sequence that results from a string literal or literals." which implies that it is no longer a string literal by the time the null is added. ---- Larry Jones UUCP: uunet!sdrc!scjones SDRC scjones@sdrc.UU.NET 2000 Eastman Dr. BIX: ltl Milford, OH 45150 AT&T: (513) 576-2070 "When all else fails, read the directions."