How limited is a strictly conforming program?
Larry Jones
scjones at sdrc.UUCP
Fri Mar 31 08:37:50 AEST 1989
In article <12208 at haddock.ima.isc.com>, karl at 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 at 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 at sdrc.UU.NET
2000 Eastman Dr. BIX: ltl
Milford, OH 45150 AT&T: (513) 576-2070
"When all else fails, read the directions."
More information about the Comp.std.c
mailing list