Skip to content

Move specification of deprecated headers to Annex D #1054

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

Merged
merged 1 commit into from
Mar 16, 2017
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions source/compatibility.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1790,16 +1790,16 @@
nor are the C headers themselves part of \Cpp.

\pnum
The headers \tcode{<ccomplex>}\indextext{\idxhdr{ccomplex}} (\ref{ccomplex.syn})
and \tcode{<ctgmath>}\indextext{\idxhdr{ctgmath}} (\ref{ctgmath.syn}), as well
The headers \tcode{<ccomplex>}\indextext{\idxhdr{ccomplex}} (\ref{depr.ccomplex.syn})
and \tcode{<ctgmath>}\indextext{\idxhdr{ctgmath}} (\ref{depr.ctgmath.syn}), as well
as their corresponding C headers \tcode{<complex.h>}\indextext{\idxhdr{complex.h}}
and \tcode{<tgmath.h>}\indextext{\idxhdr{tgmath.h}}, do not contain any of the
content from the C standard library and instead merely include other headers
from the \Cpp standard library.

\pnum
The headers \tcode{<ciso646>}, \tcode{<cstdalign>}~(\ref{cstdalign.syn}),
and \tcode{<cstdbool>}~(\ref{cstdbool.syn}) are meaningless in \Cpp. Use of
The headers \tcode{<ciso646>}, \tcode{<cstdalign>}~(\ref{depr.cstdalign.syn}),
and \tcode{<cstdbool>}~(\ref{depr.cstdbool.syn}) are meaningless in \Cpp. Use of
the \Cpp headers \tcode{<ccomplex>}, \tcode{<cstdalign>}, \tcode{<cstdbool>},
and \tcode{<ctgmath>} is deprecated~(\ref{depr.c.headers}).

Expand Down Expand Up @@ -1864,7 +1864,7 @@
\pnum
The token \tcode{alignas} is a keyword in this International
Standard (\ref{lex.key}). It does not appear as a macro name defined
in \tcode{<cstdalign>}\indexlibrary{\idxhdr{cstdalign}}~(\ref{cstdalign.syn}).
in \tcode{<cstdalign>}\indexlibrary{\idxhdr{cstdalign}}~(\ref{depr.cstdalign.syn}).

\rSec3[diff.header.stdbool.h]{Header \tcode{<stdbool.h>}}
\indexlibrary{\idxhdr{stdbool.h}}%
Expand All @@ -1873,7 +1873,7 @@
The tokens \tcode{bool}, \tcode{true}, and \tcode{false}
are keywords in this International Standard (\ref{lex.key}).
They do not appear as macro names defined in
\tcode{<cstdbool>}\indexlibrary{\idxhdr{cstdbool}}~(\ref{cstdbool.syn}).
\tcode{<cstdbool>}\indexlibrary{\idxhdr{cstdbool}}~(\ref{depr.cstdbool.syn}).

\rSec3[diff.null]{Macro \tcode{NULL}}

Expand Down
84 changes: 76 additions & 8 deletions source/future.tex
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,82 @@
\pnum
The \grammarterm{noexcept-specifier} \tcode{throw()} is deprecated.

\rSec1[depr.cpp.headers]{\Cpp standard library headers}

\pnum
For compatibility with prior \Cpp International Standards,
the \Cpp standard library provides headers
\tcode{<ccomplex>}~(\ref{depr.ccomplex.syn}),
\tcode{<cstdalign>}~(\ref{depr.cstdalign.syn}),
\tcode{<cstdbool>}~(\ref{depr.cstdbool.syn}),
and \tcode{<ctgmath>}~(\ref{depr.ctgmath.syn}).
The use of these headers is deprecated.

\rSec2[depr.ccomplex.syn]{Header \tcode{<ccomplex>} synopsis}
\indexlibrary{\idxhdr{ccomplex}}%

\begin{codeblock}
#include <complex>
\end{codeblock}

\pnum
The header \tcode{<ccomplex>}
behaves as if it simply includes the header
\tcode{<complex>}~(\ref{complex.syn}).

\rSec2[depr.cstdalign.syn]{Header \tcode{<cstdalign>} synopsis}

\indexlibrary{\idxcode{__alignas_is_defined}}%
\indexlibrary{\idxhdr{cstdalign}}%
\begin{codeblock}
#define @\xname{alignas_is_defined}@ 1
\end{codeblock}

\pnum
\indexlibrary{\idxhdr{cstdalign}}%
\indexlibrary{\idxhdr{stdalign.h}}%
The contents of the header \tcode{<cstdalign>} are the same as the C
standard library header \tcode{<stdalign.h>}, with the following changes:
The header \tcode{<cstdalign>} and the header \tcode{<stdalign.h>} shall not
define a macro named \tcode{alignas}.

\xref ISO C~7.15.

\rSec2[depr.cstdbool.syn]{Header \tcode{<cstdbool>} synopsis}

\indexlibrary{\idxhdr{cstdbool}}%
\indexlibrary{\idxcode{__bool_true_false_are_defined}}%
\begin{codeblock}
#define @\xname{bool_true_false_are_defined}@ 1
\end{codeblock}

\pnum
\indexlibrary{\idxhdr{stdbool.h}}%
The contents of the header \tcode{<cstdbool>} are the same as the C
standard library header \tcode{<stdbool.h>}, with the following changes:
The header \tcode{<cstdbool>} and the header \tcode{<stdbool.h>} shall not
define macros named \tcode{bool}, \tcode{true}, or \tcode{false}.

\xref ISO C~7.18.

\rSec2[depr.ctgmath.syn]{Header \tcode{<ctgmath>} synopsis}

\indexlibrary{\idxhdr{ctgmath}}%
\begin{codeblock}
#include <complex>
#include <cmath>
\end{codeblock}

\pnum
The header \tcode{<ctgmath>} simply includes the headers
\tcode{<complex>}~(\ref{complex.syn})
and \tcode{<cmath>}~(\ref{cmath.syn}).

\pnum
\begin{note} The overloads provided in C by type-generic macros are already
provided in \tcode{<complex>} and \tcode{<cmath>} by ``sufficient'' additional
overloads.\end{note}

\rSec1[depr.c.headers]{C standard library headers}

\pnum
Expand Down Expand Up @@ -94,14 +170,6 @@

\end{floattable}

\pnum
The use of any of the \Cpp headers
\tcode{<ccomplex>},
\tcode{<cstdalign>},
\tcode{<cstdbool>},
or \tcode{<ctgmath>}
is deprecated.

\pnum
The header \tcode{<complex.h>} behaves as if it simply includes the header \tcode{<ccomplex>}.
The header \tcode{<tgmath.h>} behaves as if it simply includes the header \tcode{<ctgmath>}.
Expand Down
25 changes: 13 additions & 12 deletions source/lib-intro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1281,18 +1281,19 @@
include at least the headers shown in Table~\ref{tab:cpp.headers.freestanding}.

\begin{libsumtab}{\Cpp headers for freestanding implementations}{tab:cpp.headers.freestanding}
& & \tcode{<ciso646>} \\ \rowsep
\ref{support.types} & Types & \tcode{<cstddef>} \\ \rowsep
\ref{support.limits}& Implementation properties & \tcode{<cfloat>} \tcode{<limits>} \tcode{<climits>} \\ \rowsep
\ref{cstdint} & Integer types & \tcode{<cstdint>} \\ \rowsep
\ref{support.start.term}& Start and termination & \tcode{<cstdlib>} \\ \rowsep
\ref{support.dynamic} & Dynamic memory management & \tcode{<new>} \\ \rowsep
\ref{support.rtti} & Type identification & \tcode{<typeinfo>} \\ \rowsep
\ref{support.exception} & Exception handling & \tcode{<exception>} \\ \rowsep
\ref{support.initlist} & Initializer lists & \tcode{<initializer_list>} \\ \rowsep
\ref{support.runtime} & Other runtime support & \tcode{<cstdalign>} \tcode{<cstdarg>} \tcode{<cstdbool>} \\ \rowsep
\ref{meta} & Type traits & \tcode{<type_traits>} \\ \rowsep
\ref{atomics} & Atomics & \tcode{<atomic>} \\
& & \tcode{<ciso646>} \\ \rowsep
\ref{support.types} & Types & \tcode{<cstddef>} \\ \rowsep
\ref{support.limits} & Implementation properties & \tcode{<cfloat>} \tcode{<limits>} \tcode{<climits>} \\ \rowsep
\ref{cstdint} & Integer types & \tcode{<cstdint>} \\ \rowsep
\ref{support.start.term} & Start and termination & \tcode{<cstdlib>} \\ \rowsep
\ref{support.dynamic} & Dynamic memory management & \tcode{<new>} \\ \rowsep
\ref{support.rtti} & Type identification & \tcode{<typeinfo>} \\ \rowsep
\ref{support.exception} & Exception handling & \tcode{<exception>} \\ \rowsep
\ref{support.initlist} & Initializer lists & \tcode{<initializer_list>} \\ \rowsep
\ref{support.runtime} & Other runtime support & \tcode{<cstdarg>} \\ \rowsep
\ref{meta} & Type traits & \tcode{<type_traits>} \\ \rowsep
\ref{atomics} & Atomics & \tcode{<atomic>} \\ \rowsep
\ref{depr.cstdalign.syn}, \ref{depr.cstdbool.syn} & Deprecated headers & \tcode{<cstdalign>} \tcode{<cstdbool>} \\
\end{libsumtab}

\pnum
Expand Down
33 changes: 1 addition & 32 deletions source/numerics.tex
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
\ref{numarray} & Numeric arrays & \tcode{<valarray>} \\ \rowsep
\ref{numeric.ops} & Generalized numeric operations & \tcode{<numeric>} \\ \rowsep
\ref{c.math} & Mathematical functions for & \tcode{<cmath>} \\
& floating-point types & \tcode{<ctgmath>} \\
& & \tcode{<cstdlib>} \\
& floating-point types & \tcode{<cstdlib>} \\
\end{libsumtab}

\rSec1[numerics.defns]{Definitions}
Expand Down Expand Up @@ -1363,18 +1362,6 @@
\tcode{complex<float>\{0.0f, static_cast<float>(d)\}}.
\end{itemdescr}

\rSec2[ccomplex.syn]{Header \tcode{<ccomplex>} synopsis}
\indextext{\idxhdr{ccomplex}}%
\indexlibrary{\idxhdr{ccomplex}}%

\begin{codeblock}
#include <complex>
\end{codeblock}

\pnum
The header \tcode{<ccomplex>}
behaves as if it simply includes the header \tcode{<complex>}.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand Down Expand Up @@ -11452,21 +11439,3 @@
\end{itemdescr}

\indextext{mathematical special functions|)}

\rSec2[ctgmath.syn]{Header \tcode{<ctgmath>} synopsis}

\indextext{\idxhdr{ctgmath}}%
\indexlibrary{\idxhdr{ctgmath}}%
\begin{codeblock}
#include <complex>
#include <cmath>
\end{codeblock}

\pnum
The header \tcode{<ctgmath>} simply includes the headers \tcode{<complex>}
and \tcode{<cmath>}.

\pnum
\begin{note} The overloads provided in C by type-generic macros are already
provided in \tcode{<complex>} and \tcode{<cmath>} by ``sufficient'' additional
overloads.\end{note}
45 changes: 1 addition & 44 deletions source/support.tex
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@
\ref{support.dynamic} & Dynamic memory management & \tcode{<new>} \\ \rowsep
\ref{support.rtti} & Type identification & \tcode{<typeinfo>} \\ \rowsep
\ref{support.exception} & Exception handling & \tcode{<exception>} \\ \rowsep
\ref{support.initlist} & Initializer lists & \tcode{<initializer_list>} \\ \rowsep
\ref{support.initlist} & Initializer lists & \tcode{<initializer_list>} \\ \rowsep
\ref{support.runtime} & Other runtime support & \tcode{<csignal>} \\
& & \tcode{<csetjmp>} \\
& & \tcode{<cstdalign>} \\
& & \tcode{<cstdarg>} \\
& & \tcode{<cstdbool>} \\
& & \tcode{<cstdlib>} \\
\end{libsumtab}

Expand Down Expand Up @@ -3732,9 +3730,7 @@
Headers
\tcode{<csetjmp>} (nonlocal jumps),
\tcode{<csignal>} (signal handling),
\tcode{<cstdalign> (alignment),}
\tcode{<cstdarg>} (variable arguments),
\tcode{<cstdbool>} (\xname{bool_true_false_are_defined}),
and
\tcode{<cstdlib>} (runtime environment \tcode{getenv, system}),
provide further compatibility with C code.
Expand Down Expand Up @@ -3846,45 +3842,6 @@

\xref ISO C~7.13.

\rSec2[cstdbool.syn]{Header \tcode{<cstdbool>} synopsis}

\indextext{\idxhdr{cstdbool}}%
\indexlibrary{\idxhdr{cstdbool}}%
\indexlibrary{\idxcode{__bool_true_false_are_defined}}%
\begin{codeblock}
#define @\xname{bool_true_false_are_defined}@ 1
\end{codeblock}

\pnum
\indextext{\idxhdr{stdbool.h}}%
\indexlibrary{\idxhdr{stdbool.h}}%
The contents of the header \tcode{<cstdbool>} are the same as the C
standard library header \tcode{<stdbool.h>}, with the following changes:
The header \tcode{<cstdbool>} and the header \tcode{<stdbool.h>} shall not
define macros named \tcode{bool}, \tcode{true}, or \tcode{false}.

\xref ISO C~7.18.

\rSec2[cstdalign.syn]{Header \tcode{<cstdalign>} synopsis}

\indexlibrary{\idxcode{__alignas_is_defined}}%
\indextext{\idxhdr{cstdalign}}%
\indexlibrary{\idxhdr{cstdalign}}%
\begin{codeblock}
#define @\xname{alignas_is_defined}@ 1
\end{codeblock}

\pnum
\indexlibrary{\idxhdr{cstdalign}}%
\indextext{\idxhdr{stdalign.h}}%
\indexlibrary{\idxhdr{stdalign.h}}%
The contents of the header \tcode{<cstdalign>} are the same as the C
standard library header \tcode{<stdalign.h>}, with the following changes:
The header \tcode{<cstdalign>} and the header \tcode{<stdalign.h>} shall not
define a macro named \tcode{alignas}.

\xref ISO C~7.15.

\rSec2[csignal.syn]{Header \tcode{<csignal>} synopsis}

\indextext{\idxhdr{csignal}}%
Expand Down