Skip to content

Commit 2f118eb

Browse files
jensmaurerzygoloid
authored andcommitted
[language.support] Reserve \xref for references to the C standard.
Also remove full stops and non-breaking spaces in \xref lines. Fixes #1561.
1 parent b7964a9 commit 2f118eb

File tree

7 files changed

+26
-34
lines changed

7 files changed

+26
-34
lines changed

source/diagnostics.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@
561561
except that a macro named \tcode{static_assert}
562562
is not defined.
563563

564-
\xref ISO C~7.2.
564+
\xref ISO C 7.2
565565

566566
\rSec2[assertions.assert]{The \tcode{assert} macro}
567567

@@ -758,7 +758,7 @@
758758
\pnum
759759
The meaning of the macros in this header is defined by the POSIX standard.
760760

761-
\xref ISO C~7.5.
761+
\xref ISO C 7.5
762762

763763
\rSec1[syserr]{System error support}
764764

source/future.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
The header \tcode{<cstdalign>} and the header \tcode{<stdalign.h>} shall not
8888
define a macro named \tcode{alignas}.
8989

90-
\xref ISO C~7.15.
90+
\xref ISO C 7.15
9191

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

@@ -104,7 +104,7 @@
104104
The header \tcode{<cstdbool>} and the header \tcode{<stdbool.h>} shall not
105105
define macros named \tcode{bool}, \tcode{true}, or \tcode{false}.
106106

107-
\xref ISO C~7.18.
107+
\xref ISO C 7.18
108108

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

source/iostreams.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@
433433
\pnum
434434
Concurrent access to a synchronized~(\ref{ios.members.static}) standard iostream object's formatted and unformatted input~(\ref{istream}) and output~(\ref{ostream}) functions or a standard C stream by multiple threads shall not result in a data race~(\ref{intro.multithread}). \begin{note} Users must still synchronize concurrent use of these objects and streams by multiple threads if they wish to avoid interleaved characters. \end{note}
435435

436-
\xref~ISO C 7.21.2.
436+
\xref ISO C 7.21.2
437437

438438
\rSec2[narrow.stream.objects]{Narrow stream objects}
439439

@@ -15393,7 +15393,7 @@
1539315393
introduce a data race~(\ref{res.on.data.races}) with other calls to \tcode{tmpnam} with
1539415394
an argument that is a null pointer value.
1539515395

15396-
\xref ISO C~7.21.
15396+
\xref ISO C 7.21
1539715397

1539815398
\rSec2[cinttypes.syn]{Header \tcode{<cinttypes>} synopsis}
1539915399

@@ -15561,4 +15561,4 @@
1556115561
\tcode{imaxdiv_t imaxdiv(intmax_t, intmax_t)}, respectively.
1556215562
\end{itemize}
1556315563

15564-
\xref ISO C~7.8.
15564+
\xref ISO C 7.8

source/locales.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5294,7 +5294,7 @@
52945294
race~(\ref{res.on.data.races}) with other calls to \tcode{setlocale} or with calls to
52955295
the functions listed in Table~\ref{tab:setlocale.data.races}.
52965296

5297-
\xref ISO C 7.11.
5297+
\xref ISO C 7.11
52985298

52995299
\begin{floattable}
53005300
{Potential \tcode{setlocale} data races}

source/strings.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5887,7 +5887,7 @@
58875887
but they have the same behavior as in the C standard library~(\ref{library.c}).
58885888
\end{note}
58895889

5890-
\xref ISO C~7.24.
5890+
\xref ISO C 7.24
58915891

58925892
\rSec2[cwchar.syn]{Header \tcode{<cwchar>} synopsis}
58935893

source/support.tex

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,8 @@
283283
but not
284284
\tcode{(void*)0}.}
285285

286+
\xref ISO C 7.19
287+
286288
\rSec2[support.types.layout]{Sizes, alignments, and offsets}
287289

288290
\pnum
@@ -317,7 +319,7 @@
317319
The type \tcode{size_t} is an
318320
\impldef{type of \tcode{size_t}}
319321
unsigned integer type that is large enough
320-
to contain the size in bytes of any object.
322+
to contain the size in bytes of any object~(\ref{expr.sizeof}).
321323

322324
\pnum
323325
\begin{note}
@@ -331,10 +333,9 @@
331333
\indexlibrary{\idxcode{max_align_t}}%
332334
\tcode{max_align_t} is a POD type whose alignment requirement
333335
is at least as great as that of every scalar type, and whose alignment
334-
requirement is supported in every context.
336+
requirement is supported in every context~(\ref{basic.align}).
335337

336-
\xref Alignment~(\ref{basic.align}), Sizeof~(\ref{expr.sizeof}), Additive
337-
operators~(\ref{expr.add}), Free store~(\ref{class.free}), and ISO C~7.19.
338+
\xref ISO C 7.19
338339

339340
\rSec2[support.types.byteops]{\tcode{byte} type operations}
340341

@@ -1594,7 +1595,7 @@
15941595
The header defines all types and macros the same as
15951596
the C standard library header \tcode{<stdint.h>}.
15961597

1597-
\xref ISO C~7.20.
1598+
\xref ISO C 7.20
15981599

15991600
\rSec1[support.start.term]{Start and termination}
16001601

@@ -1799,8 +1800,7 @@
17991800
when the functions registered with \tcode{at_quick_exit} are.
18001801
\end{itemdescr}
18011802

1802-
\xref~\ref{basic.start}, \ref{basic.start.term},
1803-
ISO C~7.22.4.
1803+
\xref ISO C 7.22.4
18041804

18051805
\rSec1[support.dynamic]{Dynamic memory management}
18061806

@@ -1867,15 +1867,11 @@
18671867
void operator delete[](void* ptr, void*) noexcept;
18681868
\end{codeblock}
18691869

1870-
\xref~\ref{intro.memory}, \ref{basic.stc.dynamic},
1871-
\ref{expr.new}, \ref{expr.delete}, \ref{class.free},
1872-
\ref{memory}.
1873-
18741870
\rSec2[new.delete]{Storage allocation and deallocation}
18751871

18761872
\pnum
18771873
Except where otherwise specified, the provisions of~\ref{basic.stc.dynamic}
1878-
apply to the library versions of \tcode{operator new} and \tcode{op\-er\-a\-tor
1874+
apply to the library versions of \tcode{operator new} and \tcode{operator
18791875
delete}.
18801876
If the value of an alignment argument
18811877
passed to any of these functions
@@ -2018,7 +2014,7 @@
20182014
The
20192015
deallocation functions~(\ref{basic.stc.dynamic.deallocation})
20202016
called by a
2021-
\grammarterm{delete-expression}
2017+
\grammarterm{delete-expression}~(\ref{expr.delete})
20222018
to render the value of \tcode{ptr} invalid.
20232019

20242020
\pnum
@@ -2823,8 +2819,6 @@
28232819
}
28242820
\end{codeblock}
28252821

2826-
\xref~\ref{expr.dynamic.cast}, \ref{expr.typeid}.
2827-
28282822
\rSec2[type.info]{Class \tcode{type_info}}
28292823

28302824
\indexlibrary{\idxcode{type_info}}%
@@ -2848,7 +2842,7 @@
28482842
\pnum
28492843
The class
28502844
\tcode{type_info}
2851-
describes type information generated by the implementation.
2845+
describes type information generated by the implementation~(\ref{expr.typeid}).
28522846
Objects of this class effectively store a pointer to a name for the type, and
28532847
an encoded value suitable for comparing two types for equality or collating order.
28542848
The names, encoding rule, and collating sequence for types are all unspecified
@@ -3103,8 +3097,6 @@
31033097
}
31043098
\end{codeblock}
31053099

3106-
\xref~\ref{except.special}.
3107-
31083100
\rSec2[exception]{Class \tcode{exception}}
31093101

31103102
\indexlibrary{\idxcode{exception}}%
@@ -3803,7 +3795,7 @@
38033795
type that results when passing an argument for which there is no
38043796
parameter, the behavior is undefined.
38053797

3806-
\xref ISO C~7.16.1.1.
3798+
\xref ISO C 7.16.1.1
38073799

38083800
\rSec2[csetjmp.syn]{Header \tcode{<csetjmp>} synopsis}
38093801

@@ -3837,7 +3829,7 @@
38373829
by \tcode{catch} and \tcode{throw} would invoke any non-trivial destructors for any automatic
38383830
objects.
38393831

3840-
\xref ISO C~7.13.
3832+
\xref ISO C 7.13
38413833

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

@@ -3955,4 +3947,4 @@
39553947
with the first argument equal to the signal number
39563948
corresponding to the signal that caused the invocation of the handler.
39573949

3958-
\xref ISO C~7.14.
3950+
\xref ISO C 7.14

source/utilities.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@
700700
\throws Nothing.
701701
\end{itemdescr}
702702

703-
\xref ISO C~7.21.6.1.
703+
\xref ISO C 7.21.6.1
704704

705705
\rSec2[utility.from.chars]{Primitive numeric input conversion}
706706

@@ -815,7 +815,7 @@
815815
\throws Nothing.
816816
\end{itemdescr}
817817

818-
\xref ISO C~7.22.1.3, ISO C~7.22.1.4.
818+
\xref ISO C 7.22.1.3, 7.22.1.4
819819

820820
\rSec1[intseq]{Compile-time integer sequences}
821821

@@ -8319,7 +8319,7 @@
83198319
\tcode{::operator delete()}\indexlibrary{\idxcode{delete}!\idxcode{operator}}.
83208320
\end{itemdescr}
83218321

8322-
\xref ISO C~7.22.3.
8322+
\xref ISO C 7.22.3
83238323

83248324
\rSec1[smartptr]{Smart pointers}
83258325

@@ -19020,7 +19020,7 @@
1902019020
\tcode{localtime} are not required to avoid data
1902119021
races~(\ref{res.on.data.races}).
1902219022

19023-
\xref ISO C~7.27.
19023+
\xref ISO C 7.27
1902419024

1902519025
\rSec1[type.index]{Class \tcode{type_index}}
1902619026

0 commit comments

Comments
 (0)