Skip to content

Commit b32a9c1

Browse files
committed
Move specification of deprecated headers to Annex D
1 parent 7f7e757 commit b32a9c1

File tree

5 files changed

+96
-95
lines changed

5 files changed

+96
-95
lines changed

source/compatibility.tex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1778,16 +1778,16 @@
17781778
nor are the C headers themselves part of \Cpp.
17791779

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

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

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

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

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

source/future.tex

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@
5050

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

53+
\pnum
54+
For compatibility with the C standard library\indextext{library!C standard},
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+
5362
\pnum
5463
For compatibility with the
5564
\indextext{library!C standard}%
@@ -106,7 +115,7 @@
106115
The header \tcode{<complex.h>} behaves as if it simply includes the header \tcode{<ccomplex>}.
107116

108117
\pnum
109-
Every other C header, each of
118+
Except for the functions declared in \ref{sf.cmath}, every C header, each of
110119
which has a name of the form
111120
\indextext{header!C}%
112121
\tcode{name.h},
@@ -141,6 +150,71 @@
141150
the namespace \tcode{std}.
142151
\end{example}
143152

153+
\rSec2[depr.ccomplex.syn]{Header \tcode{<ccomplex>} synopsis}
154+
\indexlibrary{\idxhdr{ccomplex}}%
155+
156+
\begin{codeblock}
157+
#include <complex>
158+
\end{codeblock}
159+
160+
\pnum
161+
The header \tcode{<ccomplex>}
162+
behaves as if it simply includes the header
163+
\tcode{<complex>}~(\ref{complex.syn}).
164+
165+
\rSec2[depr.cstdalign.syn]{Header \tcode{<cstdalign>} synopsis}
166+
167+
\indexlibrary{\idxcode{__alignas_is_defined}}%
168+
\indexlibrary{\idxhdr{cstdalign}}%
169+
\begin{codeblock}
170+
#define @\xname{alignas_is_defined}@ 1
171+
\end{codeblock}
172+
173+
\pnum
174+
\indexlibrary{\idxhdr{cstdalign}}%
175+
\indexlibrary{\idxhdr{stdalign.h}}%
176+
The contents of the header \tcode{<cstdalign>} are the same as the C
177+
standard library header \tcode{<stdalign.h>}, with the following changes:
178+
The header \tcode{<cstdalign>} and the header \tcode{<stdalign.h>} shall not
179+
define a macro named \tcode{alignas}.
180+
181+
\xref ISO C~7.15.
182+
183+
\rSec2[depr.cstdbool.syn]{Header \tcode{<cstdbool>} synopsis}
184+
185+
\indexlibrary{\idxhdr{cstdbool}}%
186+
\indexlibrary{\idxcode{__bool_true_false_are_defined}}%
187+
\begin{codeblock}
188+
#define @\xname{bool_true_false_are_defined}@ 1
189+
\end{codeblock}
190+
191+
\pnum
192+
\indexlibrary{\idxhdr{stdbool.h}}%
193+
The contents of the header \tcode{<cstdbool>} are the same as the C
194+
standard library header \tcode{<stdbool.h>}, with the following changes:
195+
The header \tcode{<cstdbool>} and the header \tcode{<stdbool.h>} shall not
196+
define macros named \tcode{bool}, \tcode{true}, or \tcode{false}.
197+
198+
\xref ISO C~7.18.
199+
200+
\rSec2[depr.ctgmath.syn]{Header \tcode{<ctgmath>} synopsis}
201+
202+
\indexlibrary{\idxhdr{ctgmath}}%
203+
\begin{codeblock}
204+
#include <complex>
205+
#include <cmath>
206+
\end{codeblock}
207+
208+
\pnum
209+
The header \tcode{<ctgmath>} simply includes the headers
210+
\tcode{<complex>}~(\ref{complex.syn})
211+
and \tcode{<cmath>}~(\ref{cmath.syn}).
212+
213+
\pnum
214+
\begin{note} The overloads provided in C by type-generic macros are already
215+
provided in \tcode{<complex>} and \tcode{<cmath>} by ``sufficient'' additional
216+
overloads.\end{note}
217+
144218
\rSec1[depr.str.strstreams]{\tcode{char*} streams}
145219

146220
\pnum

source/lib-intro.tex

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,18 +1284,19 @@
12841284
include at least the headers shown in Table~\ref{tab:cpp.headers.freestanding}.
12851285

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

13011302
\pnum

source/numerics.tex

Lines changed: 1 addition & 32 deletions
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}
@@ -1361,18 +1360,6 @@
13611360
\tcode{complex<float>\{0.0f, static_cast<float>(d)\}}.
13621361
\end{itemdescr}
13631362

1364-
\rSec2[ccomplex.syn]{Header \tcode{<ccomplex>} synopsis}
1365-
\indextext{\idxhdr{ccomplex}}%
1366-
\indexlibrary{\idxhdr{ccomplex}}%
1367-
1368-
\begin{codeblock}
1369-
#include <complex>
1370-
\end{codeblock}
1371-
1372-
\pnum
1373-
The header \tcode{<ccomplex>}
1374-
behaves as if it simply includes the header \tcode{<complex>}.
1375-
13761363
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13771364
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13781365
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -11282,21 +11269,3 @@
1128211269
\end{itemdescr}
1128311270

1128411271
\indextext{mathematical special functions|)}
11285-
11286-
\rSec2[ctgmath.syn]{Header \tcode{<ctgmath>} synopsis}
11287-
11288-
\indextext{\idxhdr{ctgmath}}%
11289-
\indexlibrary{\idxhdr{ctgmath}}%
11290-
\begin{codeblock}
11291-
#include <complex>
11292-
#include <cmath>
11293-
\end{codeblock}
11294-
11295-
\pnum
11296-
The header \tcode{<ctgmath>} simply includes the headers \tcode{<complex>}
11297-
and \tcode{<cmath>}.
11298-
11299-
\pnum
11300-
\begin{note} The overloads provided in C by type-generic macros are already
11301-
provided in \tcode{<complex>} and \tcode{<cmath>} by ``sufficient'' additional
11302-
overloads.\end{note}

source/support.tex

Lines changed: 1 addition & 44 deletions
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

@@ -3529,9 +3527,7 @@
35293527
Headers
35303528
\tcode{<csetjmp>} (nonlocal jumps),
35313529
\tcode{<csignal>} (signal handling),
3532-
\tcode{<cstdalign> (alignment),}
35333530
\tcode{<cstdarg>} (variable arguments),
3534-
\tcode{<cstdbool>} (\xname{bool_true_false_are_defined}),
35353531
and
35363532
\tcode{<cstdlib>} (runtime environment \tcode{getenv(), system()}),
35373533
provide further compatibility with C code.
@@ -3640,45 +3636,6 @@
36403636

36413637
\xref ISO C~7.13.
36423638

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

36843641
\indextext{\idxhdr{csignal}}%

0 commit comments

Comments
 (0)