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

[std] Improve index for 'freestanding/hosted implementation'. #3949

Merged
merged 1 commit into from
Sep 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions source/atomics.tex
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@
whose template arguments are integral types, respectively signed and unsigned,
and whose \tcode{is_always_lock_free} property is \tcode{true}.
\begin{note}
\indextext{implementation!freestanding}%
These aliases are optional in freestanding implementations\iref{compliance}.
\end{note}
Implementations should choose for these aliases
Expand Down Expand Up @@ -620,6 +621,7 @@
for the corresponding unsigned type\iref{basic.fundamental},
is always lock-free.
\begin{note}
\indextext{implementation!freestanding}%
This requirement is optional in freestanding implementations\iref{compliance}.
\end{note}

Expand Down
2 changes: 2 additions & 0 deletions source/basic.tex
Original file line number Diff line number Diff line change
Expand Up @@ -5785,6 +5785,7 @@
example, allow executions inconsistent with a simple interleaving, as described
below.
\end{note}
\indextext{implementation!freestanding}%
Under a freestanding implementation, it is \impldef{number of
threads in a program under a freestanding implementation} whether a program can
have more than one thread of execution.
Expand Down Expand Up @@ -6409,6 +6410,7 @@
in which the \tcode{main} function is invoked,
and in which variables of static storage duration
might be initialized\iref{basic.start.static} and destroyed\iref{basic.start.term}.
\indextext{implementation!freestanding}%
It is \impldef{defining \tcode{main} in freestanding environment}
whether a program in a freestanding environment is required to define a \tcode{main}
function.
Expand Down
4 changes: 2 additions & 2 deletions source/intro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,8 @@
\indextext{conformance requirements!library|)}

\pnum
Two kinds of implementations are defined: a \defn{hosted implementation} and a
\defn{freestanding implementation}. For a hosted implementation, this
Two kinds of implementations are defined: a \defnadj{hosted}{implementation} and a
\defnadj{freestanding}{implementation}. For a hosted implementation, this
document defines the set of available libraries. A freestanding
implementation is one in which execution may take place without the benefit of
an operating system, and has an \impldef{required libraries for freestanding
Expand Down
10 changes: 6 additions & 4 deletions source/lib-intro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1464,19 +1464,19 @@
\end{multicolfloattable}

\rSec3[compliance]{Freestanding implementations}
\indextext{implementation!freestanding|(}%

\pnum
Two kinds of implementations are defined:
\defnx{hosted}{implementation!hosted}
and
\defnx{freestanding}{implementation!freestanding}\iref{intro.compliance};
\indextext{implementation!hosted}%
hosted and freestanding\iref{intro.compliance};
the kind of the implementation is
\impldef{whether the implementation is hosted or freestanding}.
For a hosted implementation, this document
describes the set of available headers.

\pnum
A freestanding implementation\indextext{implementation!freestanding} has an
A freestanding implementation has an
\impldef{headers for freestanding implementation} set of headers. This set shall
include at least the headers shown in \tref{headers.cpp.fs}.

Expand Down Expand Up @@ -1514,6 +1514,7 @@
and
\indexlibraryglobal{quick_exit}%
\tcode{quick_exit}\iref{support.start.term}.
\indextext{implementation!hosted}%
The supplied version of the header \libheaderrefx{atomic}{atomics.syn}
shall meet the same requirements as for a hosted implementation
except that support for
Expand All @@ -1526,6 +1527,7 @@
\tcode{atomic_unsigned_lock_free} in freestanding environments}.
The other headers listed in this table
shall meet the same requirements as for a hosted implementation.
\indextext{implementation!freestanding|)}%

\rSec2[using]{Using the library}

Expand Down
8 changes: 6 additions & 2 deletions source/preprocessor.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1669,9 +1669,13 @@

\item
\indextext{__stdc_hosted__@\mname{STDC_HOSTED}}%
\indextext{implementation!hosted}%
\indextext{implementation!freestanding}%
\mname{STDC_HOSTED}\\
The integer literal \tcode{1} if the implementation is a hosted
implementation or the integer literal \tcode{0} if it is not.
The integer literal \tcode{1}
if the implementation is a hosted implementation or
the integer literal \tcode{0}
if it is a freestanding implementation\iref{intro.compliance}.

\item
\indextext{__stdcpp_default_new_alignment__@\mname{STDCPP_DEFAULT_NEW_ALIGNMENT}}%
Expand Down