4. Conformance

Previous Table of Contents "New C Standard" commentary

82 In this International Standard, “shall” is to be interpreted as a requirement on an implementation or on a program;

83 conversely, “shall not” is to be interpreted as a prohibition.

84 If a “shall” or “shall not” requirement that appears outside of a constraint is violated, the behavior is undefined.

85 Undefined behavior is otherwise indicated in this International Standard by the words “undefined behavior” or by the omission of any explicit definition of behavior.

86 There is no difference in emphasis among these three;

87 they all describe “behavior that is undefined”.

88 A program that is correct in all other aspects, operating on correct data, containing unspecified behavior shall be a correct program and act in accordance with

89 The implementation shall not successfully translate a preprocessing translation unit containing a #error preprocessing directive unless it is part of a group skipped by conditional inclusion.

90 A strictly conforming program shall use only those features of the language and library specified in this International Standard.2)

91 It shall not produce output dependent on any unspecified, undefined, or implementation-defined behavior, and shall not exceed any minimum implementation limit.

92 The two forms of conforming implementation are hosted and freestanding.

93 A conforming hosted implementation shall accept any strictly conforming program.

94 A conforming freestanding implementation shall accept any strictly conforming program that does not use complex types and in which the use of the features specified in the library clause (clause 7) is confined to the contents of the standard headers <float.h>, <iso646.h>, <limits.h>, <stdarg.h>, <stdbool.h>, <stddef.h>, and <stdint.h>.

95 A conforming implementation may have extensions (including additional library functions), provided they do not alter the behavior of any strictly conforming program.3)

96 2) A strictly conforming program can use conditional features (such as those in annex F) provided the use is guarded by a #ifdef directive with the appropriate macro.

97 For example:

        #ifdef __STDC_IEC_559__ /* FE_UPWARD defined */
           /* ... */
           /* ... */

98 3) This implies that a conforming implementation reserves no identifiers other than those explicitly reserved in this International Standard.

99 A conforming program is one that is acceptable to a conforming implementation.4)

100 An implementation shall be accompanied by a document that defines all implementation-defined and locale-specific characteristics and all extensions.

101 Forward references: conditional inclusion (6.10.1), error directive (6.10.5), characteristics of floating types <float.h> (7.7), alternative spellings <iso646.h> (7.9), sizes of integer types <limits.h> (7.10), variable arguments <stdarg.h> (7.15), boolean type and values <stdbool.h> (7.16), common definitions <stddef.h> (7.17), integer types <stdint.h> (7.18).

102 4) Strictly conforming programs are intended to be maximally portable among conforming implementations.

103 Conforming programs may depend upon nonportable features of a conforming implementation.


Created at: 2008-01-30 02:39:39 The text from WG14/N1256 is copyright © ISO