Skip to content

Commit 806773a

Browse files
committed
Move specification of deprecated headers to Annex D
1 parent 791e71b commit 806773a

File tree

5 files changed

+96
-89
lines changed

5 files changed

+96
-89
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},
@@ -139,6 +148,71 @@
139148
the namespace \tcode{std}.
140149
\end{example}
141150

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

144218
\pnum

source/lib-intro.tex

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

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

13031304
\pnum

source/numerics.tex

Lines changed: 1 addition & 30 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}
@@ -1364,17 +1363,6 @@
13641363
\tcode{complex<float>\{0.0f, static_cast<float>(d)\}}.
13651364
\end{itemdescr}
13661365

1367-
\rSec2[ccomplex.syn]{Header \tcode{<ccomplex>} synopsis}
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-
13781366
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13791367
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13801368
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -11292,20 +11280,3 @@
1129211280
\end{itemdescr}
1129311281

1129411282
\indextext{mathematical special functions|)}
11295-
11296-
\rSec2[ctgmath.syn]{Header \tcode{<ctgmath>} synopsis}
11297-
11298-
\indexlibrary{\idxhdr{ctgmath}}%
11299-
\begin{codeblock}
11300-
#include <complex>
11301-
#include <cmath>
11302-
\end{codeblock}
11303-
11304-
\pnum
11305-
The header \tcode{<ctgmath>} simply includes the headers \tcode{<complex>}
11306-
and \tcode{<cmath>}.
11307-
11308-
\pnum
11309-
\begin{note} The overloads provided in C by type-generic macros are already
11310-
provided in \tcode{<complex>} and \tcode{<cmath>} by ``sufficient'' additional
11311-
overloads.\end{note}

source/support.tex

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

@@ -3514,9 +3512,7 @@
35143512
Headers
35153513
\tcode{<csetjmp>} (nonlocal jumps),
35163514
\tcode{<csignal>} (signal handling),
3517-
\tcode{<cstdalign> (alignment),}
35183515
\tcode{<cstdarg>} (variable arguments),
3519-
\tcode{<cstdbool>} (\xname{bool_true_false_are_defined}),
35203516
and
35213517
\tcode{<cstdlib>} (runtime environment \tcode{getenv(), system()}),
35223518
provide further compatibility with C code.
@@ -3621,41 +3617,6 @@
36213617

36223618
\xref ISO C~7.13.
36233619

3624-
\rSec2[cstdbool.syn]{Header \tcode{<cstdbool>} synopsis}
3625-
3626-
\indexlibrary{\idxhdr{cstdbool}}%
3627-
\indexlibrary{\idxcode{__bool_true_false_are_defined}}%
3628-
\begin{codeblock}
3629-
#define @\xname{bool_true_false_are_defined}@ 1
3630-
\end{codeblock}
3631-
3632-
\pnum
3633-
\indexlibrary{\idxhdr{stdbool.h}}%
3634-
The contents of the header \tcode{<cstdbool>} are the same as the C
3635-
standard library header \tcode{<stdbool.h>}, with the following changes:
3636-
The header \tcode{<cstdbool>} and the header \tcode{<stdbool.h>} shall not
3637-
define macros named \tcode{bool}, \tcode{true}, or \tcode{false}.
3638-
3639-
\xref ISO C~7.18.
3640-
3641-
\rSec2[cstdalign.syn]{Header \tcode{<cstdalign>} synopsis}
3642-
3643-
\indexlibrary{\idxcode{__alignas_is_defined}}%
3644-
\indexlibrary{\idxhdr{cstdalign}}%
3645-
\begin{codeblock}
3646-
#define @\xname{alignas_is_defined}@ 1
3647-
\end{codeblock}
3648-
3649-
\pnum
3650-
\indexlibrary{\idxhdr{cstdalign}}%
3651-
\indexlibrary{\idxhdr{stdalign.h}}%
3652-
The contents of the header \tcode{<cstdalign>} are the same as the C
3653-
standard library header \tcode{<stdalign.h>}, with the following changes:
3654-
The header \tcode{<cstdalign>} and the header \tcode{<stdalign.h>} shall not
3655-
define a macro named \tcode{alignas}.
3656-
3657-
\xref ISO C~7.15.
3658-
36593620
\rSec2[csignal.syn]{Header \tcode{<csignal>} synopsis}
36603621

36613622
\indexlibrary{\idxhdr{csignal}}%

0 commit comments

Comments
 (0)