Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[whole standard] Audit index of implementation-defined behavior #899

Merged
merged 2 commits into from Sep 23, 2016

Conversation

AlisdairM
Copy link
Contributor

Review all uses of the terms 'implementation-defined' and
'implementation defined' in the standard, and replace with
\impldef entries in the index of implementation defined
behavior where appropriate.

Clean up some older index entries that did not have a clear
reference, and appear to predate the index of implementation
defined behavior being added by Pete Becker for C++11.

Changes may appear more disruptive than in practice, due to
word-wrapping reflowing a paragraph or two in the doc source,
but not on the rendered pdf.

Review all uses of the terms 'implementation-defined' and
'implementation defined' in the standard, and replace with
\impldef entries in the index of implementation defined
behavior where appropriate.

Clean up some older index entries that did not have a clear
reference, and appear to predate the index of implementation
defined behavior being added by Pete Becker for C++11.

Changes may appear more disruptive than in practice, due to
word-wrapping reflowing a paragraph or two in the doc source,
but not on the rendered pdf.
@@ -1277,7 +1277,8 @@
If the threads of execution created by \tcode{std::thread} provide concurrent
forward progress guarantees~(\ref{intro.progress}), then a thread of execution
implicitly created by the library will provide parallel forward progress guarantees;
otherwise, the provided forward progress guarantee is implementation-defined.
otherwise, the provided forward progress guarantee is
\impldef{forward progress guarantees for implicits thread of parallel agorithms (if not defined for \tcode{std::thread})}.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typos: "implicits thread" -> "implicit threads", "agorithms"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -2889,8 +2889,8 @@
passing an invalid pointer value to a deallocation function
have undefined behavior.
Any other use of an invalid pointer value
has implementation-defined behavior.%
\footnote{Some implementations might define that
has \impldef{any use of an invalid pointer other than to dereference or deallcate}
Copy link
Member

@zygoloid zygoloid Sep 22, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"deallcate"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe dereference -> perform indirection?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done and Done

@@ -1482,8 +1482,9 @@
Valid \CppXIV code that uses trigraphs may not be valid or may have different
semantics in this International Standard. Implementations may choose to
translate trigraphs as specified in \CppXIV if they appear outside of a raw
string literal, as part of the implementation-defined mapping from physical
source file characters to the basic source character set.
string literal, as part of the \impldef{mapping physical source file characters
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add "of" or "from" after "mapping"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chose 'from'

@@ -176,7 +176,8 @@

\item Otherwise, if the object to which the glvalue refers contains an invalid
pointer value~(\ref{basic.stc.dynamic.deallocation},
\ref{basic.stc.dynamic.safety}), the behavior is implementation-defined.
\ref{basic.stc.dynamic.safety}), the behavior is
\impldef{lvalue-to-rvalue conversion of an invalid pointer}.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pointer -> pointer value

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -181,7 +181,8 @@
the members of the basic source character set are intended to
identify characters from the subset of ISO/IEC 10646 which corresponds to the ASCII
character set. However, because the mapping from source file characters to the source
character set (described in translation phase 1) is specified as implementation-defined,
character set (described in translation phase 1) is specified as
\impldef{mapping physical source file characters to basic source character set},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep this matching the other occurrence of this phrase if we add "of" or "from" there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

is conditionally-supported with \impldef{meaning of \tcode{'}, \tcode{\textbackslash},
\tcode{/*}, or \tcode{//} in a \grammarterm{q-char-sequence} or an
\grammarterm{h-char-sequence}} semantics, as is the appearance of the character
\tcode{"} in an \grammarterm{h-char-sequence}.\footnote{Thus, a sequence of characters
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should presumably have some entry for the "-in-h-char-sequence case, perhaps add words for this case to the prior \impldef?

Copy link
Contributor Author

@AlisdairM AlisdairM Sep 23, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a slightly more complex rewording than I, as a non-Core-competent drafter, am comfortable with. I agree a change for the index is important, but without "implementation-defined" occurring as a phrase in the current paragraph, I would need to substantially reword in order to introduce an \impldef{}. As the rest of this patch is entirely such simple substitutions, I would prefer to open #928, and land the rest of this patch.

@@ -11018,7 +11018,8 @@
from the upstream memory resource~(\ref{memory.resource.monotonic.buffer})
to replenish a pool.
If the value of \tcode{max_blocks_per_chunk} is zero or
is greater than an implementation-defined limit, that limit is used instead.
is greater than an \impldef{maximum maximum number of blocks to replenish a pool}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"maximum maximum"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maximum maximum is actually correct, but probably too cute - reworded.

@@ -11036,7 +11037,8 @@
Attempts to allocate a single block larger than this threshold
will be allocated directly from the upstream memory resource.
If \tcode{largest_required_pool_block} is zero or
is greater than an implementation-defined limit, that limit is used instead.
is greater than an \impldef{largest allocation satisfied directly by a pool}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is quite right; the thing that's implementation-defined is the largest value that is supported as the largest allocation to be satisfied by a pool. But some less-confusing way to word that would be preferred :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworded.

Update patch for index of implenetation-defined behavior following
review.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants