Skip to content

Commit 9f28d7c

Browse files
committed
Move specification of deprecated headers to Annex D
1 parent 5bc5cba commit 9f28d7c

File tree

5 files changed

+98
-103
lines changed

5 files changed

+98
-103
lines changed

source/compatibility.tex

+6-6
Original file line numberDiff line numberDiff line change
@@ -1777,16 +1777,16 @@
17771777
nor are the C headers themselves part of \Cpp.
17781778

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

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

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

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

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

source/future.tex

+77-9
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,82 @@
4848
\pnum
4949
The \grammarterm{noexcept-specifier} \tcode{throw()} is deprecated.
5050

51+
\rSec1[depr.cpp.headers]{\Cpp standard library headers}
52+
53+
\pnum
54+
For compatibility with prior \Cpp International Standards,
55+
the \Cpp standard library provides headers
56+
\tcode{<ccomplex>}~(\ref{depr.ccomplex.syn}),
57+
\tcode{<cstdalign>}~(\ref{depr.cstdalign.syn}),
58+
\tcode{<cstdbool>}~(\ref{depr.cstdbool.syn}),
59+
and \tcode{<ctgmath>}~(\ref{depr.ctgmath.syn}).
60+
The use of these headers is deprecated.
61+
62+
\rSec2[depr.ccomplex.syn]{Header \tcode{<ccomplex>} synopsis}
63+
\indexlibrary{\idxhdr{ccomplex}}%
64+
65+
\begin{codeblock}
66+
#include <complex>
67+
\end{codeblock}
68+
69+
\pnum
70+
The header \tcode{<ccomplex>}
71+
behaves as if it simply includes the header
72+
\tcode{<complex>}~(\ref{complex.syn}).
73+
74+
\rSec2[depr.cstdalign.syn]{Header \tcode{<cstdalign>} synopsis}
75+
76+
\indexlibrary{\idxcode{__alignas_is_defined}}%
77+
\indexlibrary{\idxhdr{cstdalign}}%
78+
\begin{codeblock}
79+
#define @\xname{alignas_is_defined}@ 1
80+
\end{codeblock}
81+
82+
\pnum
83+
\indexlibrary{\idxhdr{cstdalign}}%
84+
\indexlibrary{\idxhdr{stdalign.h}}%
85+
The contents of the header \tcode{<cstdalign>} are the same as the C
86+
standard library header \tcode{<stdalign.h>}, with the following changes:
87+
The header \tcode{<cstdalign>} and the header \tcode{<stdalign.h>} shall not
88+
define a macro named \tcode{alignas}.
89+
90+
\xref ISO C~7.15.
91+
92+
\rSec2[depr.cstdbool.syn]{Header \tcode{<cstdbool>} synopsis}
93+
94+
\indexlibrary{\idxhdr{cstdbool}}%
95+
\indexlibrary{\idxcode{__bool_true_false_are_defined}}%
96+
\begin{codeblock}
97+
#define @\xname{bool_true_false_are_defined}@ 1
98+
\end{codeblock}
99+
100+
\pnum
101+
\indexlibrary{\idxhdr{stdbool.h}}%
102+
The contents of the header \tcode{<cstdbool>} are the same as the C
103+
standard library header \tcode{<stdbool.h>}, with the following changes:
104+
The header \tcode{<cstdbool>} and the header \tcode{<stdbool.h>} shall not
105+
define macros named \tcode{bool}, \tcode{true}, or \tcode{false}.
106+
107+
\xref ISO C~7.18.
108+
109+
\rSec2[depr.ctgmath.syn]{Header \tcode{<ctgmath>} synopsis}
110+
111+
\indexlibrary{\idxhdr{ctgmath}}%
112+
\begin{codeblock}
113+
#include <complex>
114+
#include <cmath>
115+
\end{codeblock}
116+
117+
\pnum
118+
The header \tcode{<ctgmath>} simply includes the headers
119+
\tcode{<complex>}~(\ref{complex.syn})
120+
and \tcode{<cmath>}~(\ref{cmath.syn}).
121+
122+
\pnum
123+
\begin{note} The overloads provided in C by type-generic macros are already
124+
provided in \tcode{<complex>} and \tcode{<cmath>} by ``sufficient'' additional
125+
overloads.\end{note}
126+
51127
\rSec1[depr.c.headers]{C standard library headers}
52128

53129
\pnum
@@ -94,19 +170,11 @@
94170

95171
\end{floattable}
96172

97-
\pnum
98-
The use of any of the \Cpp headers
99-
\tcode{<ccomplex>},
100-
\tcode{<cstdalign>},
101-
\tcode{<cstdbool>},
102-
or \tcode{<ctgmath>}
103-
is deprecated.
104-
105173
\pnum
106174
The header \tcode{<complex.h>} behaves as if it simply includes the header \tcode{<ccomplex>}.
107175

108176
\pnum
109-
Every other C header, each of
177+
Except for the functions declared in \ref{sf.cmath}, every other C header, each of
110178
which has a name of the form
111179
\indextext{header!C}%
112180
\tcode{name.h},

source/lib-intro.tex

+13-12
Original file line numberDiff line numberDiff line change
@@ -1280,18 +1280,19 @@
12801280
include at least the headers shown in Table~\ref{tab:cpp.headers.freestanding}.
12811281

12821282
\begin{libsumtab}{\Cpp headers for freestanding implementations}{tab:cpp.headers.freestanding}
1283-
& & \tcode{<ciso646>} \\ \rowsep
1284-
\ref{support.types} & Types & \tcode{<cstddef>} \\ \rowsep
1285-
\ref{support.limits}& Implementation properties & \tcode{<cfloat>} \tcode{<limits>} \tcode{<climits>} \\ \rowsep
1286-
\ref{cstdint} & Integer types & \tcode{<cstdint>} \\ \rowsep
1287-
\ref{support.start.term}& Start and termination & \tcode{<cstdlib>} \\ \rowsep
1288-
\ref{support.dynamic} & Dynamic memory management & \tcode{<new>} \\ \rowsep
1289-
\ref{support.rtti} & Type identification & \tcode{<typeinfo>} \\ \rowsep
1290-
\ref{support.exception} & Exception handling & \tcode{<exception>} \\ \rowsep
1291-
\ref{support.initlist} & Initializer lists & \tcode{<initializer_list>} \\ \rowsep
1292-
\ref{support.runtime} & Other runtime support & \tcode{<cstdalign>} \tcode{<cstdarg>} \tcode{<cstdbool>} \\ \rowsep
1293-
\ref{meta} & Type traits & \tcode{<type_traits>} \\ \rowsep
1294-
\ref{atomics} & Atomics & \tcode{<atomic>} \\
1283+
& & \tcode{<ciso646>} \\ \rowsep
1284+
\ref{support.types} & Types & \tcode{<cstddef>} \\ \rowsep
1285+
\ref{support.limits} & Implementation properties & \tcode{<cfloat>} \tcode{<limits>} \tcode{<climits>} \\ \rowsep
1286+
\ref{cstdint} & Integer types & \tcode{<cstdint>} \\ \rowsep
1287+
\ref{support.start.term} & Start and termination & \tcode{<cstdlib>} \\ \rowsep
1288+
\ref{support.dynamic} & Dynamic memory management & \tcode{<new>} \\ \rowsep
1289+
\ref{support.rtti} & Type identification & \tcode{<typeinfo>} \\ \rowsep
1290+
\ref{support.exception} & Exception handling & \tcode{<exception>} \\ \rowsep
1291+
\ref{support.initlist} & Initializer lists & \tcode{<initializer_list>} \\ \rowsep
1292+
\ref{support.runtime} & Other runtime support & \tcode{<cstdarg>} \\ \rowsep
1293+
\ref{meta} & Type traits & \tcode{<type_traits>} \\ \rowsep
1294+
\ref{atomics} & Atomics & \tcode{<atomic>} \\ \rowsep
1295+
\ref{depr.cstdalign.syn}, \ref{depr.cstdbool.syn} & Deprecated headers & \tcode{<cstdalign>} \tcode{<cstdbool>} \\
12951296
\end{libsumtab}
12961297

12971298
\pnum

source/numerics.tex

+1-32
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
\ref{numarray} & Numeric arrays & \tcode{<valarray>} \\ \rowsep
2626
\ref{numeric.ops} & Generalized numeric operations & \tcode{<numeric>} \\ \rowsep
2727
\ref{c.math} & Mathematical functions for & \tcode{<cmath>} \\
28-
& floating-point types & \tcode{<ctgmath>} \\
29-
& & \tcode{<cstdlib>} \\
28+
& floating-point types & \tcode{<cstdlib>} \\
3029
\end{libsumtab}
3130

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

1366-
\rSec2[ccomplex.syn]{Header \tcode{<ccomplex>} synopsis}
1367-
\indextext{\idxhdr{ccomplex}}%
1368-
\indexlibrary{\idxhdr{ccomplex}}%
1369-
1370-
\begin{codeblock}
1371-
#include <complex>
1372-
\end{codeblock}
1373-
1374-
\pnum
1375-
The header \tcode{<ccomplex>}
1376-
behaves as if it simply includes the header \tcode{<complex>}.
1377-
13781365
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13791366
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13801367
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -11261,21 +11248,3 @@
1126111248
\end{itemdescr}
1126211249

1126311250
\indextext{mathematical special functions|)}
11264-
11265-
\rSec2[ctgmath.syn]{Header \tcode{<ctgmath>} synopsis}
11266-
11267-
\indextext{\idxhdr{ctgmath}}%
11268-
\indexlibrary{\idxhdr{ctgmath}}%
11269-
\begin{codeblock}
11270-
#include <complex>
11271-
#include <cmath>
11272-
\end{codeblock}
11273-
11274-
\pnum
11275-
The header \tcode{<ctgmath>} simply includes the headers \tcode{<complex>}
11276-
and \tcode{<cmath>}.
11277-
11278-
\pnum
11279-
\begin{note} The overloads provided in C by type-generic macros are already
11280-
provided in \tcode{<complex>} and \tcode{<cmath>} by ``sufficient'' additional
11281-
overloads.\end{note}

source/support.tex

+1-44
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,10 @@
3232
\ref{support.dynamic} & Dynamic memory management & \tcode{<new>} \\ \rowsep
3333
\ref{support.rtti} & Type identification & \tcode{<typeinfo>} \\ \rowsep
3434
\ref{support.exception} & Exception handling & \tcode{<exception>} \\ \rowsep
35-
\ref{support.initlist} & Initializer lists & \tcode{<initializer_list>} \\ \rowsep
35+
\ref{support.initlist} & Initializer lists & \tcode{<initializer_list>} \\ \rowsep
3636
\ref{support.runtime} & Other runtime support & \tcode{<csignal>} \\
3737
& & \tcode{<csetjmp>} \\
38-
& & \tcode{<cstdalign>} \\
3938
& & \tcode{<cstdarg>} \\
40-
& & \tcode{<cstdbool>} \\
4139
& & \tcode{<cstdlib>} \\
4240
\end{libsumtab}
4341

@@ -3538,9 +3536,7 @@
35383536
Headers
35393537
\tcode{<csetjmp>} (nonlocal jumps),
35403538
\tcode{<csignal>} (signal handling),
3541-
\tcode{<cstdalign> (alignment),}
35423539
\tcode{<cstdarg>} (variable arguments),
3543-
\tcode{<cstdbool>} (\xname{bool_true_false_are_defined}),
35443540
and
35453541
\tcode{<cstdlib>} (runtime environment \tcode{getenv, system}),
35463542
provide further compatibility with C code.
@@ -3649,45 +3645,6 @@
36493645

36503646
\xref ISO C~7.13.
36513647

3652-
\rSec2[cstdbool.syn]{Header \tcode{<cstdbool>} synopsis}
3653-
3654-
\indextext{\idxhdr{cstdbool}}%
3655-
\indexlibrary{\idxhdr{cstdbool}}%
3656-
\indexlibrary{\idxcode{__bool_true_false_are_defined}}%
3657-
\begin{codeblock}
3658-
#define @\xname{bool_true_false_are_defined}@ 1
3659-
\end{codeblock}
3660-
3661-
\pnum
3662-
\indextext{\idxhdr{stdbool.h}}%
3663-
\indexlibrary{\idxhdr{stdbool.h}}%
3664-
The contents of the header \tcode{<cstdbool>} are the same as the C
3665-
standard library header \tcode{<stdbool.h>}, with the following changes:
3666-
The header \tcode{<cstdbool>} and the header \tcode{<stdbool.h>} shall not
3667-
define macros named \tcode{bool}, \tcode{true}, or \tcode{false}.
3668-
3669-
\xref ISO C~7.18.
3670-
3671-
\rSec2[cstdalign.syn]{Header \tcode{<cstdalign>} synopsis}
3672-
3673-
\indexlibrary{\idxcode{__alignas_is_defined}}%
3674-
\indextext{\idxhdr{cstdalign}}%
3675-
\indexlibrary{\idxhdr{cstdalign}}%
3676-
\begin{codeblock}
3677-
#define @\xname{alignas_is_defined}@ 1
3678-
\end{codeblock}
3679-
3680-
\pnum
3681-
\indexlibrary{\idxhdr{cstdalign}}%
3682-
\indextext{\idxhdr{stdalign.h}}%
3683-
\indexlibrary{\idxhdr{stdalign.h}}%
3684-
The contents of the header \tcode{<cstdalign>} are the same as the C
3685-
standard library header \tcode{<stdalign.h>}, with the following changes:
3686-
The header \tcode{<cstdalign>} and the header \tcode{<stdalign.h>} shall not
3687-
define a macro named \tcode{alignas}.
3688-
3689-
\xref ISO C~7.15.
3690-
36913648
\rSec2[csignal.syn]{Header \tcode{<csignal>} synopsis}
36923649

36933650
\indextext{\idxhdr{csignal}}%

0 commit comments

Comments
 (0)