Skip to content

Commit 7a820ce

Browse files
committed
Move specification of deprecated headers to Annex D
1 parent f1afd40 commit 7a820ce

File tree

5 files changed

+95
-96
lines changed

5 files changed

+95
-96
lines changed

source/compatibility.tex

+6-6
Original file line numberDiff line numberDiff line change
@@ -1761,16 +1761,16 @@
17611761
nor are the C headers themselves part of \Cpp.
17621762

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

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

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

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

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

source/future.tex

+74-8
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}%
@@ -94,14 +103,6 @@
94103

95104
\end{floattable}
96105

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-
105106
\pnum
106107
Except for the functions declared in \ref{sf.cmath}, every C header, each of
107108
which has a name of the form
@@ -134,6 +135,71 @@
134135
the namespace \tcode{std}.
135136
\end{example}
136137

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

139205
\pnum

source/lib-intro.tex

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

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

13021303
\pnum

source/numerics.tex

+1-30
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}
@@ -1359,17 +1358,6 @@
13591358
\tcode{complex<float>\{0.0f, static_cast<float>(d)\}}.
13601359
\end{itemdescr}
13611360

1362-
\rSec2[ccomplex.syn]{Header \tcode{<ccomplex>} synopsis}
1363-
\indexlibrary{\idxhdr{ccomplex}}%
1364-
1365-
\begin{codeblock}
1366-
#include <complex>
1367-
\end{codeblock}
1368-
1369-
\pnum
1370-
The header \tcode{<ccomplex>}
1371-
behaves as if it simply includes the header \tcode{<complex>}.
1372-
13731361
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13741362
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13751363
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -11281,20 +11269,3 @@
1128111269
\end{itemdescr}
1128211270

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

source/support.tex

+1-40
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

@@ -3512,9 +3510,7 @@
35123510
Headers
35133511
\tcode{<csetjmp>} (nonlocal jumps),
35143512
\tcode{<csignal>} (signal handling),
3515-
\tcode{<cstdalign> (alignment),}
35163513
\tcode{<cstdarg>} (variable arguments),
3517-
\tcode{<cstdbool>} (\xname{bool_true_false_are_defined}),
35183514
and
35193515
\tcode{<cstdlib>} (runtime environment \tcode{getenv(), system()}),
35203516
provide further compatibility with C code.
@@ -3619,41 +3615,6 @@
36193615

36203616
\xref ISO C~7.13.
36213617

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

36593620
\indexlibrary{\idxhdr{csignal}}%

0 commit comments

Comments
 (0)