Skip to content

Commit

Permalink
[std] Reword "necessary", "permitted", "allowed", "may" in notes.
Browse files Browse the repository at this point in the history
This is so that notes do not (inappropriately) state requirements or
permissions.
  • Loading branch information
tkoeppe committed Jan 8, 2024
1 parent 65496fb commit db045ae
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 25 deletions.
12 changes: 6 additions & 6 deletions source/basic.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6202,15 +6202,15 @@
The ``inter-thread happens before'' relation describes arbitrary
concatenations of ``sequenced before'', ``synchronizes with'' and
``dependency-ordered before'' relationships, with two exceptions. The first
exception is that a concatenation is not permitted to end with
exception is that a concatenation never ends with
``dependency-ordered before'' followed by ``sequenced before''. The reason for
this limitation is that a consume operation participating in a
``dependency-ordered before'' relationship provides ordering only with respect
to operations to which this consume operation actually carries a dependency. The
reason that this limitation applies only to the end of such a concatenation is
that any subsequent release operation will provide the required ordering for a
prior consume operation. The second exception is that a concatenation is not
permitted to consist entirely of ``sequenced before''. The reasons for this
prior consume operation. The second exception is that a concatenation never
consist entirely of ``sequenced before''. The reasons for this
limitation are (1) to permit ``inter-thread happens before'' to be transitively
closed and (2) the ``happens before'' relation, defined below, provides for
relationships consisting entirely of ``sequenced before''.
Expand Down Expand Up @@ -6290,7 +6290,7 @@
\begin{note}
This states that operations on
ordinary objects are not visibly reordered. This is not actually detectable
without data races, but it is necessary to ensure that data races, as defined
without data races, but is needed to ensure that data races, as defined
below, and with suitable restrictions on the use of atomics, correspond to data
races in a simple interleaved (sequentially consistent) execution.
\end{note}
Expand Down Expand Up @@ -6401,7 +6401,7 @@
However, this applies only to data-race-free programs, and data-race-free
programs cannot observe most program transformations that do not change
single-threaded program semantics. In fact, most single-threaded program
transformations continue to be allowed, since any program that behaves
transformations remain possible, since any program that behaves
differently as a result has undefined behavior.
\end{note}

Expand Down Expand Up @@ -6538,7 +6538,7 @@
the implementation ensures that the thread will eventually make progress for as
long as it has not terminated.
\begin{note}
This is regardless of whether or not other threads of execution (if any)
This applies regardless of whether or not other threads of execution (if any)
have been or are making progress. To eventually fulfill this requirement means that
this will happen in an unspecified but finite amount of time.
\end{note}
Expand Down
3 changes: 1 addition & 2 deletions source/classes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3074,8 +3074,7 @@
structs that share a common initial sequence\iref{class.mem}, and
if a non-static data member of an object of this standard-layout union type
is active and is one of the standard-layout structs,
it is permitted to inspect the common initial sequence
of any of the standard-layout struct members;
the common initial sequence of any of the standard-layout struct members can be inspected;
see~\ref{class.mem}.
\end{note}

Expand Down
8 changes: 4 additions & 4 deletions source/declarations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,7 @@
\begin{codeblock}
friend class T;
\end{codeblock}
is ill-formed. However, the similar declaration \tcode{friend T;} is allowed\iref{class.friend}.
is ill-formed. However, the similar declaration \tcode{friend T;} is well-formed.\iref{class.friend}.
\end{note}

\pnum
Expand Down Expand Up @@ -4684,7 +4684,7 @@
\tcode{X}.
The form
\tcode{()}
is permitted in certain other initialization contexts\iref{expr.new,
can appear in certain other initialization contexts\iref{expr.new,
expr.type.conv,class.base.init}.
\end{note}

Expand Down Expand Up @@ -4752,7 +4752,7 @@
is sequenced before those associated with the initialization of $e_j$.
\begin{note}
By contrast with direct-list-initialization,
narrowing conversions\iref{dcl.init.list} are permitted,
narrowing conversions\iref{dcl.init.list} can appear,
designators are not permitted,
a temporary object bound to a reference
does not have its lifetime extended\iref{class.temporary}, and
Expand Down Expand Up @@ -9332,7 +9332,7 @@
If a function \tcode{f} is called where \tcode{f} was previously declared with the \tcode{noreturn}
attribute and \tcode{f} eventually returns, the behavior is undefined.
\begin{note}
The function may
The function can
terminate by throwing an exception.
\end{note}

Expand Down
2 changes: 1 addition & 1 deletion source/expressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6080,7 +6080,7 @@
inheritance relationship between the two classes.
\begin{note}
For example, if the classes were defined later in the translation unit,
a multi-pass compiler would be permitted to interpret a cast between
a multi-pass compiler could validly interpret a cast between
pointers to the classes as if the class types were complete at the point
of the cast.
\end{note}
Expand Down
4 changes: 2 additions & 2 deletions source/iostreams.tex
Original file line number Diff line number Diff line change
Expand Up @@ -13839,8 +13839,8 @@
\begin{note}
Some operating systems have no unambiguous way to distinguish between native format and generic format arguments.
This is by design as it simplifies use for operating systems that do not require
disambiguation. An implementation for an operating system where disambiguation
is required is permitted to distinguish between the formats.
disambiguation. It is possible that an implementation for an operating system
where disambiguation is needed distinguishes between the formats.
\end{note}

\pnum
Expand Down
4 changes: 2 additions & 2 deletions source/lib-intro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3605,8 +3605,8 @@
provided by an implementation.
\begin{note}
In particular,
an implementation is not allowed to provide
an additional declaration of that function or function template
a conforming implementation does not provide
any additional declarations of that function or function template
at namespace scope.
\end{note}
\begin{note}
Expand Down
3 changes: 2 additions & 1 deletion source/numerics.tex
Original file line number Diff line number Diff line change
Expand Up @@ -9472,7 +9472,8 @@
if \tcode{X} cannot be converted to \tcode{int}
by integral promotion\iref{conv.prom}, the program is ill-formed.
\begin{note}
Arguments that can be promoted to \tcode{int} are permitted for compatibility with C.
Allowing arguments that can be promoted to \tcode{int}
provides compatibility with C.
\end{note}
\end{itemdescr}

Expand Down
4 changes: 2 additions & 2 deletions source/overloading.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2141,8 +2141,8 @@
or when converting to the left operand of an assignment operation
only standard conversion sequences are allowed.
\begin{note}
When converting to the explicit object parameter, if any,
user-defined conversion sequences are allowed.
When a conversion to the explicit object parameter occurs,
it can include user-defined conversion sequences.
\end{note}

\pnum
Expand Down
7 changes: 3 additions & 4 deletions source/support.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3915,10 +3915,9 @@
returns an \tcode{exception_ptr} object that refers to the thrown exception or,
if this is not possible, to an instance of \tcode{bad_exception}.
\begin{note}
The
copy constructor of the thrown exception can also fail, so the implementation is allowed
to substitute a \tcode{bad_exception} object to avoid infinite
recursion.
The copy constructor of the thrown exception can also fail,
so the implementation can substitute a \tcode{bad_exception} object
to avoid infinite recursion.
\end{note}
\end{itemdescr}

Expand Down
2 changes: 1 addition & 1 deletion source/templates.tex
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@
\keyword{typename}
prefix, the
\keyword{template}
prefix is allowed
prefix is well-formed
even when lookup for the name would already find a template.
\end{note}
\begin{example}
Expand Down

0 comments on commit db045ae

Please sign in to comment.