reserved external identifiers

Arthur David Olson ado at elsie.UUCP
Sat Mar 5 05:31:09 AEST 1988


In article <1988Mar3.185806.1356 at utzoo.uucp>, henry at utzoo.uucp (Henry Spencer) writes:

> > ... recent drafts
> > do not say that implementers may reserve *only* those identifiers.
> 
> If you read section 1.7 very carefully and thoughtfully, you may change
> your mind.  Assume your compiler reserves "xyz".  Is a program which is
> otherwise "strictly conforming" rendered not so by using "xyz" for its
> own purposes?  No.

Sorry; my reading says the answer is "Yes."  Section 1.7 says "A strictly
conforming program shall use only those features of the language and library
specified in this Standard.  It shall not produce output dependent on any
unspecified, undefined, or implementation-defined behavior. . ."  And
Section 4.2 says "If [a] program defines an external identifier with the same
name as a reserved external identifier. . .the behavior is undefined."  So:
if the compiler reserves "xyz", programs that use xyz have behavior that's
undefined and are thus not strictly conforming.
-- 
ado at vax2.nlm.nih.gov		ADO, VAX, and NIH are Ampex and DEC trademarks



More information about the Comp.lang.c mailing list