23

In the C++11 standard(closest draft is N3337) section 1.2 Normative references says:

The following referenced documents are indispensable for the application of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.

but there are no guidelines on how to apply the references. The easy cases are when the C++11 explicitly refers back to a reference, for example in section 3.9.1 Fundamental types it says:

[...]The signed and unsigned integer types shall satisfy the constraints given in the C standard, section 5.2.4.2.1.

But what about other cases where there is no explicit reference? For example, C++11 uses the word indeterminate value but it does not define the term. The normative references include:

— ISO/IEC 9899:1999, Programming languages — C

[...]

— ISO/IEC 9899:1999/Cor.3:2007(E), Programming languages — C, Technical Corrigendum 3

and C99(draft c99 standard) does have a definition for indeterminate value in section 3.17.2 which says:

either an unspecified value or a trap representation

Is it correct to say that indeterminate value is defined C++11 by reference to C99, like this answer seems to do for the definition of bit? If yes, what about trap representation which is covered in in section 6.2.6.1 paragraph 5 under Representations of types in C99?

The generous reading would be that as long as nothing in the C++11 conflicts with a normative reference then it applies, is this the correct interpretation? Some of the answers to What is indeterminate behavior in C++ ? How is it different from undefined behavior? seem to imply a generous reading, although the language is a bit loose in some of the answers, so it is hard to tell what exactly is being claimed on some points.

Community
  • 1
  • 1
Shafik Yaghmour
  • 154,301
  • 39
  • 440
  • 740
  • @downvoters I would appreciate any feedback, this topic as far as I can tell is not covered at all on SO and clearly seems ambiguous and therefore useful to the community. – Shafik Yaghmour Apr 15 '14 at 19:37

1 Answers1

17

The function of the Normative References section of an ISO standard document is defined in ISO/IEC Directives, Part 2, 2011 §6.2.2:

6.2.2 Normative references

This conditional element shall give a list of the referenced documents cited (see 6.6.7.5) in the document in such a way as to make them indispensable for the application of the document. For dated references, each shall be given with its year of publication, or, in the case of enquiry or final drafts, with a dash together with a footnote “To be published.”, and full title. The year of publication or dash shall not be given for undated references. When an undated reference is to all parts of a document, the publication number shall be followed by the indication “(all parts)” and the general title of the series of parts (i.e. the introductory and main elements, see Annex E).

In principle, the referenced documents shall be documents published by ISO and/or IEC. Documents published by other bodies may be referred to in a normative manner provided that

a) the referenced document is recognized by the ISO and/or IEC committee concerned as having wide acceptance and authoritative status as well as being publicly available,

b) the ISO and/or IEC committee concerned has obtained the agreement of the authors or publishers (where known) of the referenced document to its inclusion and to its being made available as required — the authors or publishers will be expected to make available such documents on request,

c) the authors or publishers (where known) have also agreed to inform the ISO and/or IEC committee concerned of their intention to revise the referenced document and of the points the revision will concern, and

d) the ISO and/or IEC committee concerned undertakes to review the situation in the light of any changes in the referenced document.

The list shall be introduced by the following wording:

“The following documents, in whole or in part, are normatively referenced in this document and are indispensable for its application. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.”

The above wording is also applicable to a part of a multipart document.

The list shall not include the following:

  • referenced documents which are not publicly available;

  • referenced documents which are only cited in an informative manner;

  • referenced documents which have merely served as bibliographic or background material in the preparation of the document.

Such referenced documents may be listed in a bibliography (see 6.4.2).

It notably does not say that the contents of the referenced documents are incorporated into the current document. Essentially it serves as a list of all the other standard documents that are in some way normatively referenced elsewhere in the document.

So not everything in, e.g., C99 is incorporated into C++11 - only those parts of C99 specifically referenced as being incorporated in the C++11 standard.

Casey
  • 41,449
  • 7
  • 95
  • 125
  • Interesting, I notice that the reference you provide says `The list shall be introduced by the following wording` but the C++ standard does not use that exact wording, notably leaving out `in whole or in part,`. I am also curious what Lightness has to say since I referenced his answer in my question and he seems to be doing what you say is not valid. – Shafik Yaghmour Apr 12 '14 at 00:47
  • 1
    Interesting. I find no fault in Casey's logic and I won't state categorically that he's wrong. What I will say is that I think this seems ambiguous and left down to common sense; if nothing else, the term "_normative_ reference" would seem to speak for itself. My conclusion is that this'll remain subjective in large part until the committee can clarify. – Lightness Races in Orbit Apr 14 '14 at 12:07
  • @LightnessRacesinOrbit thank you, that is not an unreasonable stance. I will probably start a bounty to see if I can draw some more feedback on this. – Shafik Yaghmour Apr 14 '14 at 12:46
  • @ShafikYaghmour: Good idea — I'll drum up some interest too. Good luck! – Lightness Races in Orbit Apr 14 '14 at 13:59
  • I still think there is some ambiguity on this but no one was able to come up with better answer. I am still curious if you think the difference in wording I pointed out makes a difference. – Shafik Yaghmour Apr 22 '14 at 13:43
  • @LightnessRacesinOrbit: The phrase “normative reference” simply means that the references to it have normative impact (which is why they’re “indispensable”) rather than “only [being] cited in an informative manner”. – Davis Herring May 03 '19 at 03:54
  • @Davis Well, yes, exactly. – Lightness Races in Orbit May 03 '19 at 09:24