From Jason Turner

[intro.compliance]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpq9apa0m1/{from.md → to.md} +37 -23
tmp/tmpq9apa0m1/{from.md → to.md} RENAMED
@@ -1,87 +1,101 @@
1
  ## Implementation compliance <a id="intro.compliance">[[intro.compliance]]</a>
2
 
 
 
3
  The set of *diagnosable rules* consists of all syntactic and semantic
4
  rules in this document except for those rules containing an explicit
5
  notation that “no diagnostic is required” or which are described as
6
  resulting in “undefined behavior”.
7
 
8
  Although this document states only requirements on C++ implementations,
9
  those requirements are often easier to understand if they are phrased as
10
  requirements on programs, parts of programs, or execution of programs.
11
  Such requirements have the following meaning:
12
 
13
- - If a program contains no violations of the rules in this document, a
14
- conforming implementation shall, within its resource limits, accept
15
- and correctly execute[^2] that program.
16
- - If a program contains a violation of any diagnosable rule or an
17
- occurrence of a construct described in this document as
18
- “conditionally-supported” when the implementation does not support
19
- that construct, a conforming implementation shall issue at least one
20
- diagnostic message.
21
  - If a program contains a violation of a rule for which no diagnostic is
22
  required, this document places no requirement on implementations with
23
  respect to that program.
 
 
 
 
 
24
 
25
  [*Note 1*: During template argument deduction and substitution, certain
26
  constructs that in other contexts require a diagnostic are treated
27
  differently; see  [[temp.deduct]]. — *end note*]
28
 
 
 
 
 
 
 
 
 
 
 
29
  For classes and class templates, the library Clauses specify partial
30
  definitions. Private members [[class.access]] are not specified, but
31
  each implementation shall supply them to complete the definitions
32
  according to the description in the library Clauses.
33
 
34
  For functions, function templates, objects, and values, the library
35
  Clauses specify declarations. Implementations shall supply definitions
36
  consistent with the descriptions in the library Clauses.
37
 
38
- The names defined in the library have namespace scope
39
- [[basic.namespace]]. A C++ translation unit [[lex.phases]] obtains
40
- access to these names by including the appropriate standard library
41
  header or importing the appropriate standard library named header unit
42
  [[using.headers]].
43
 
44
  The templates, classes, functions, and objects in the library have
45
  external linkage [[basic.link]]. The implementation provides definitions
46
  for standard library entities, as necessary, while combining translation
47
  units to form a complete C++ program [[lex.phases]].
48
 
49
  Two kinds of implementations are defined: a *hosted implementation* and
50
- a *freestanding implementation*. For a hosted implementation, this
51
- document defines the set of available libraries. A freestanding
52
- implementation is one in which execution may take place without the
53
- benefit of an operating system, and has an *implementation-defined* set
54
- of libraries that includes certain language-support libraries
55
- [[compliance]].
56
 
57
  A conforming implementation may have extensions (including additional
58
  library functions), provided they do not alter the behavior of any
59
  well-formed program. Implementations are required to diagnose programs
60
  that use such extensions that are ill-formed according to this document.
61
  Having done so, however, they can compile and execute such programs.
62
 
63
  Each implementation shall include documentation that identifies all
64
  conditionally-supported constructs that it does not support and defines
65
- all locale-specific characteristics.[^3]
66
 
67
  ### Abstract machine <a id="intro.abstract">[[intro.abstract]]</a>
68
 
69
  The semantic descriptions in this document define a parameterized
70
  nondeterministic abstract machine. This document places no requirement
71
  on the structure of conforming implementations. In particular, they need
72
  not copy or emulate the structure of the abstract machine. Rather,
73
  conforming implementations are required to emulate (only) the observable
74
- behavior of the abstract machine as explained below.[^4]
75
 
76
  Certain aspects and operations of the abstract machine are described in
77
  this document as implementation-defined (for example, `sizeof(int)`).
78
  These constitute the parameters of the abstract machine. Each
79
  implementation shall include documentation describing its
80
- characteristics and behavior in these respects.[^5] Such documentation
81
- shall define the instance of the abstract machine that corresponds to
82
- that implementation (referred to as the “corresponding instance below).
 
 
83
 
84
  Certain other aspects and operations of the abstract machine are
85
  described in this document as unspecified (for example, order of
86
  evaluation of arguments in a function call [[expr.call]]). Where
87
  possible, this document defines a set of allowable behaviors. These
@@ -117,7 +131,7 @@ The least requirements on a conforming implementation are:
117
 
118
  These collectively are referred to as the *observable behavior* of the
119
  program.
120
 
121
  [*Note 2*: More stringent correspondences between abstract and actual
122
- semantics may be defined by each implementation. — *end note*]
123
 
 
1
  ## Implementation compliance <a id="intro.compliance">[[intro.compliance]]</a>
2
 
3
+ ### General <a id="intro.compliance.general">[[intro.compliance.general]]</a>
4
+
5
  The set of *diagnosable rules* consists of all syntactic and semantic
6
  rules in this document except for those rules containing an explicit
7
  notation that “no diagnostic is required” or which are described as
8
  resulting in “undefined behavior”.
9
 
10
  Although this document states only requirements on C++ implementations,
11
  those requirements are often easier to understand if they are phrased as
12
  requirements on programs, parts of programs, or execution of programs.
13
  Such requirements have the following meaning:
14
 
15
+ - If a program contains no violations of the rules in [[lex]] through
16
+ [[thread]] and [[depr]], a conforming implementation shall, within its
17
+ resource limits as described in [[implimits]], accept and correctly
18
+ execute[^3] that program.
 
 
 
 
19
  - If a program contains a violation of a rule for which no diagnostic is
20
  required, this document places no requirement on implementations with
21
  respect to that program.
22
+ - Otherwise, if a program contains a violation of any diagnosable rule
23
+ or an occurrence of a construct described in this document as
24
+ “conditionally-supported” when the implementation does not support
25
+ that construct, a conforming implementation shall issue at least one
26
+ diagnostic message.
27
 
28
  [*Note 1*: During template argument deduction and substitution, certain
29
  constructs that in other contexts require a diagnostic are treated
30
  differently; see  [[temp.deduct]]. — *end note*]
31
 
32
+ Furthermore, a conforming implementation
33
+
34
+ - shall not accept a preprocessing translation unit containing a
35
+ `#error` preprocessing directive [[cpp.error]],
36
+ - shall issue at least one diagnostic message for each `#warning` or
37
+ `#error` preprocessing directive not following a `#error`
38
+ preprocessing directive in a preprocessing translation unit, and
39
+ - shall not accept a translation unit with a *static_assert-declaration*
40
+ that fails [[dcl.pre]].
41
+
42
  For classes and class templates, the library Clauses specify partial
43
  definitions. Private members [[class.access]] are not specified, but
44
  each implementation shall supply them to complete the definitions
45
  according to the description in the library Clauses.
46
 
47
  For functions, function templates, objects, and values, the library
48
  Clauses specify declarations. Implementations shall supply definitions
49
  consistent with the descriptions in the library Clauses.
50
 
51
+ A C++ translation unit [[lex.phases]] obtains access to the names
52
+ defined in the library by including the appropriate standard library
 
53
  header or importing the appropriate standard library named header unit
54
  [[using.headers]].
55
 
56
  The templates, classes, functions, and objects in the library have
57
  external linkage [[basic.link]]. The implementation provides definitions
58
  for standard library entities, as necessary, while combining translation
59
  units to form a complete C++ program [[lex.phases]].
60
 
61
  Two kinds of implementations are defined: a *hosted implementation* and
62
+ a *freestanding implementation*. A freestanding implementation is one in
63
+ which execution may take place without the benefit of an operating
64
+ system. A hosted implementation supports all the facilities described in
65
+ this document, while a freestanding implementation supports the entire
66
+ C++ language described in [[lex]] through [[cpp]] and the subset of the
67
+ library facilities described in [[compliance]].
68
 
69
  A conforming implementation may have extensions (including additional
70
  library functions), provided they do not alter the behavior of any
71
  well-formed program. Implementations are required to diagnose programs
72
  that use such extensions that are ill-formed according to this document.
73
  Having done so, however, they can compile and execute such programs.
74
 
75
  Each implementation shall include documentation that identifies all
76
  conditionally-supported constructs that it does not support and defines
77
+ all locale-specific characteristics.[^4]
78
 
79
  ### Abstract machine <a id="intro.abstract">[[intro.abstract]]</a>
80
 
81
  The semantic descriptions in this document define a parameterized
82
  nondeterministic abstract machine. This document places no requirement
83
  on the structure of conforming implementations. In particular, they need
84
  not copy or emulate the structure of the abstract machine. Rather,
85
  conforming implementations are required to emulate (only) the observable
86
+ behavior of the abstract machine as explained below.[^5]
87
 
88
  Certain aspects and operations of the abstract machine are described in
89
  this document as implementation-defined (for example, `sizeof(int)`).
90
  These constitute the parameters of the abstract machine. Each
91
  implementation shall include documentation describing its
92
+ characteristics and behavior in these respects.[^6]
93
+
94
+ Such documentation shall define the instance of the abstract machine
95
+ that corresponds to that implementation (referred to as the
96
+ “corresponding instance” below).
97
 
98
  Certain other aspects and operations of the abstract machine are
99
  described in this document as unspecified (for example, order of
100
  evaluation of arguments in a function call [[expr.call]]). Where
101
  possible, this document defines a set of allowable behaviors. These
 
131
 
132
  These collectively are referred to as the *observable behavior* of the
133
  program.
134
 
135
  [*Note 2*: More stringent correspondences between abstract and actual
136
+ semantics can be defined by each implementation. — *end note*]
137