Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[too many to list] Index macros directly from definitions #7525

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
236 changes: 80 additions & 156 deletions source/diagnostics.tex

Large diffs are not rendered by default.

24 changes: 9 additions & 15 deletions source/future.tex
Original file line number Diff line number Diff line change
Expand Up @@ -221,33 +221,27 @@

\pnum
The header \libheaderref{stdalign.h} has the following macros:
\indexlibraryglobal{__alignas_is_defined}%
\begin{codeblock}
#define @\xname{alignas_is_defined}@ 1
#define @\xname{alignof_is_defined}@ 1
#define @\libxmacro{alignas_is_defined}@ 1
#define @\libxmacro{alignof_is_defined}@ 1
\end{codeblock}

\pnum
The header \libheaderref{stdbool.h} has the following macro:
\indexlibraryglobal{__bool_true_false_are_defined}%
\begin{codeblock}
#define @\xname{bool_true_false_are_defined}@ 1
#define @\libxmacro{bool_true_false_are_defined}@ 1
\end{codeblock}

\rSec1[depr.cerrno]{Deprecated error numbers}

\pnum
The header \libheaderref{cerrno} has the following additional macros:

\indexlibraryglobal{ENODATA}%
\indexlibraryglobal{ENOSR}%
\indexlibraryglobal{ENOSTR}%
\indexlibraryglobal{ETIME}%
\begin{codeblock}
#define ENODATA @\seebelow@
#define ENOSR @\seebelow@
#define ENOSTR @\seebelow@
#define ETIME @\seebelow@
#define @\libmacro{ENODATA}@ @\seebelow@
#define @\libmacro{ENOSR}@ @\seebelow@
#define @\libmacro{ENOSTR}@ @\seebelow@
#define @\libmacro{ETIME}@ @\seebelow@
\end{codeblock}

\pnum
Expand Down Expand Up @@ -861,7 +855,7 @@
template<class T>
void atomic_init(atomic<T>*, typename atomic<T>::value_type) noexcept;

#define ATOMIC_VAR_INIT(value) @\seebelow@
#define @\libmacro{ATOMIC_VAR_INIT}@(value) @\seebelow@
}
\end{codeblock}

Expand Down Expand Up @@ -910,7 +904,7 @@

\indexlibraryglobal{ATOMIC_VAR_INIT}%
\begin{itemdecl}
#define ATOMIC_VAR_INIT(value) @\seebelow@
#define @\libmacro{ATOMIC_VAR_INIT}@(value) @\seebelow@
\end{itemdecl}

\begin{itemdescr}
Expand Down
114 changes: 38 additions & 76 deletions source/iostreams.tex
Original file line number Diff line number Diff line change
Expand Up @@ -18825,22 +18825,6 @@
\indexlibraryglobal{size_t}%
\indexlibraryglobal{FILE}%
\indexlibraryglobal{fpos_t}%
\indexlibraryglobal{NULL}%
\indexlibraryglobal{_IOFBF}%
\indexlibraryglobal{_IOLBF}%
\indexlibraryglobal{_IONBF}%
\indexlibraryglobal{BUFSIZ}%
\indexlibraryglobal{EOF}%
\indexlibraryglobal{FOPEN_MAX}%
\indexlibraryglobal{FILENAME_MAX}%
\indexlibraryglobal{L_tmpnam}%
\indexlibraryglobal{SEEK_CUR}%
\indexlibraryglobal{SEEK_END}%
\indexlibraryglobal{SEEK_SET}%
\indexlibraryglobal{TMP_MAX}%
\indexlibraryglobal{stderr}%
\indexlibraryglobal{stdin}%
\indexlibraryglobal{stdout}%
\indexlibraryglobal{remove}%
\indexlibraryglobal{rename}%
\indexlibraryglobal{tmpfile}%
Expand Down Expand Up @@ -18893,22 +18877,22 @@
using fpos_t = @\seebelow@;
}

#define NULL @\textit{see \ref{support.types.nullptr}}@
#define _IOFBF @\seebelow@
#define _IOLBF @\seebelow@
#define _IONBF @\seebelow@
#define BUFSIZ @\seebelow@
#define EOF @\seebelow@
#define FOPEN_MAX @\seebelow@
#define FILENAME_MAX @\seebelow@
#define L_tmpnam @\seebelow@
#define SEEK_CUR @\seebelow@
#define SEEK_END @\seebelow@
#define SEEK_SET @\seebelow@
#define TMP_MAX @\seebelow@
#define stderr @\seebelow@
#define stdin @\seebelow@
#define stdout @\seebelow@
#define @\libmacro{NULL}@ @\textit{see \ref{support.types.nullptr}}@
#define @\libmacro{_IOFBF}@ @\seebelow@
#define @\libmacro{_IOLBF}@ @\seebelow@
#define @\libmacro{_IONBF}@ @\seebelow@
#define @\libmacro{BUFSIZ}@ @\seebelow@
#define @\libmacro{EOF}@ @\seebelow@
#define @\libmacro{FOPEN_MAX}@ @\seebelow@
#define @\libmacro{FILENAME_MAX}@ @\seebelow@
#define @\libmacro{L_tmpnam}@ @\seebelow@
#define @\libmacro{SEEK_CUR}@ @\seebelow@
#define @\libmacro{SEEK_END}@ @\seebelow@
#define @\libmacro{SEEK_SET}@ @\seebelow@
#define @\libmacro{TMP_MAX}@ @\seebelow@
#define @\libmacro{stderr}@ @\seebelow@
#define @\libmacro{stdin}@ @\seebelow@
#define @\libmacro{stdout}@ @\seebelow@

namespace std {
int remove(const char* filename);
Expand Down Expand Up @@ -19015,28 +18999,6 @@
\indexlibraryglobal{SCNoFASTN}%
\indexlibraryglobal{SCNuFASTN}%
\indexlibraryglobal{SCNxFASTN}%
\indexlibraryglobal{PRIdMAX}%
\indexlibraryglobal{PRIiMAX}%
\indexlibraryglobal{PRIoMAX}%
\indexlibraryglobal{PRIuMAX}%
\indexlibraryglobal{PRIxMAX}%
\indexlibraryglobal{PRIXMAX}%
\indexlibraryglobal{SCNdMAX}%
\indexlibraryglobal{SCNiMAX}%
\indexlibraryglobal{SCNoMAX}%
\indexlibraryglobal{SCNuMAX}%
\indexlibraryglobal{SCNxMAX}%
\indexlibraryglobal{PRIdPTR}%
\indexlibraryglobal{PRIiPTR}%
\indexlibraryglobal{PRIoPTR}%
\indexlibraryglobal{PRIuPTR}%
\indexlibraryglobal{PRIxPTR}%
\indexlibraryglobal{PRIXPTR}%
\indexlibraryglobal{SCNdPTR}%
\indexlibraryglobal{SCNiPTR}%
\indexlibraryglobal{SCNoPTR}%
\indexlibraryglobal{SCNuPTR}%
\indexlibraryglobal{SCNxPTR}%
\begin{codeblock}
#include <cstdint> // see \ref{cstdint.syn}

Expand Down Expand Up @@ -19087,28 +19049,28 @@
#define SCNoFAST@\placeholdernc{N}@ @\seebelow@
#define SCNuFAST@\placeholdernc{N}@ @\seebelow@
#define SCNxFAST@\placeholdernc{N}@ @\seebelow@
#define PRIdMAX @\seebelow@
#define PRIiMAX @\seebelow@
#define PRIoMAX @\seebelow@
#define PRIuMAX @\seebelow@
#define PRIxMAX @\seebelow@
#define PRIXMAX @\seebelow@
#define SCNdMAX @\seebelow@
#define SCNiMAX @\seebelow@
#define SCNoMAX @\seebelow@
#define SCNuMAX @\seebelow@
#define SCNxMAX @\seebelow@
#define PRIdPTR @\seebelow@
#define PRIiPTR @\seebelow@
#define PRIoPTR @\seebelow@
#define PRIuPTR @\seebelow@
#define PRIxPTR @\seebelow@
#define PRIXPTR @\seebelow@
#define SCNdPTR @\seebelow@
#define SCNiPTR @\seebelow@
#define SCNoPTR @\seebelow@
#define SCNuPTR @\seebelow@
#define SCNxPTR @\seebelow@
#define @\libmacro{PRIdMAX}@ @\seebelow@
#define @\libmacro{PRIiMAX}@ @\seebelow@
#define @\libmacro{PRIoMAX}@ @\seebelow@
#define @\libmacro{PRIuMAX}@ @\seebelow@
#define @\libmacro{PRIxMAX}@ @\seebelow@
#define @\libmacro{PRIXMAX}@ @\seebelow@
#define @\libmacro{SCNdMAX}@ @\seebelow@
#define @\libmacro{SCNiMAX}@ @\seebelow@
#define @\libmacro{SCNoMAX}@ @\seebelow@
#define @\libmacro{SCNuMAX}@ @\seebelow@
#define @\libmacro{SCNxMAX}@ @\seebelow@
#define @\libmacro{PRIdPTR}@ @\seebelow@
#define @\libmacro{PRIiPTR}@ @\seebelow@
#define @\libmacro{PRIoPTR}@ @\seebelow@
#define @\libmacro{PRIuPTR}@ @\seebelow@
#define @\libmacro{PRIxPTR}@ @\seebelow@
#define @\libmacro{PRIXPTR}@ @\seebelow@
#define @\libmacro{SCNdPTR}@ @\seebelow@
#define @\libmacro{SCNiPTR}@ @\seebelow@
#define @\libmacro{SCNoPTR}@ @\seebelow@
#define @\libmacro{SCNuPTR}@ @\seebelow@
#define @\libmacro{SCNxPTR}@ @\seebelow@
\end{codeblock}

\pnum
Expand Down
5 changes: 5 additions & 0 deletions source/macros.tex
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,11 @@
\newcommand{\libmember}[2]{\indexlibrarymember{#1}{#2}#1}
\newcommand{\libspec}[2]{\indexlibrarymemberx{#1}{#2}#1}

% index for macros
% Use in-place defining the macro in header synopses.
\newcommand{\libmacro}[1]{\indexlibraryglobal{#1}\CodeStylex{#1}}
\newcommand{\libxmacro}[1]{\indexlibraryglobal{\idxxname{#1}}\CodeStylex{\xname{#1}}}

% index for library headers
\newcommand{\libheaderx}[2]{\indexhdr{#1}\tcode{<#2>}}
\newcommand{\libheader}[1]{\libheaderx{#1}{#1}}
Expand Down
91 changes: 31 additions & 60 deletions source/numerics.tex
Original file line number Diff line number Diff line change
Expand Up @@ -98,31 +98,20 @@
\indexlibraryglobal{feholdexcept}%
\indexlibraryglobal{fesetenv}%
\indexlibraryglobal{feupdateenv}%
\indexlibraryglobal{FE_ALL_EXCEPT}%
\indexlibraryglobal{FE_DIVBYZERO}%
\indexlibraryglobal{FE_INEXACT}%
\indexlibraryglobal{FE_INVALID}%
\indexlibraryglobal{FE_OVERFLOW}%
\indexlibraryglobal{FE_UNDERFLOW}%
\indexlibraryglobal{FE_DOWNWARD}%
\indexlibraryglobal{FE_TONEAREST}%
\indexlibraryglobal{FE_TOWARDZERO}%
\indexlibraryglobal{FE_UPWARD}%
\indexlibraryglobal{FE_DFL_ENV}%
\begin{codeblock}
#define FE_ALL_EXCEPT @\seebelow@
#define FE_DIVBYZERO @\seebelow@ // optional
#define FE_INEXACT @\seebelow@ // optional
#define FE_INVALID @\seebelow@ // optional
#define FE_OVERFLOW @\seebelow@ // optional
#define FE_UNDERFLOW @\seebelow@ // optional
#define @\libmacro{FE_ALL_EXCEPT}@ @\seebelow@
#define @\libmacro{FE_DIVBYZERO}@ @\seebelow@ // optional
#define @\libmacro{FE_INEXACT}@ @\seebelow@ // optional
#define @\libmacro{FE_INVALID}@ @\seebelow@ // optional
#define @\libmacro{FE_OVERFLOW}@ @\seebelow@ // optional
#define @\libmacro{FE_UNDERFLOW}@ @\seebelow@ // optional

#define FE_DOWNWARD @\seebelow@ // optional
#define FE_TONEAREST @\seebelow@ // optional
#define FE_TOWARDZERO @\seebelow@ // optional
#define FE_UPWARD @\seebelow@ // optional
#define @\libmacro{FE_DOWNWARD}@ @\seebelow@ // optional
#define @\libmacro{FE_TONEAREST}@ @\seebelow@ // optional
#define @\libmacro{FE_TOWARDZERO}@ @\seebelow@ // optional
#define @\libmacro{FE_UPWARD}@ @\seebelow@ // optional

#define FE_DFL_ENV @\seebelow@
#define @\libmacro{FE_DFL_ENV}@ @\seebelow@

namespace std {
// types
Expand Down Expand Up @@ -9128,23 +9117,6 @@
\rSec2[cmath.syn]{Header \tcode{<cmath>} synopsis}

\indexheader{cmath}%
\indexlibraryglobal{FP_FAST_FMA}%
\indexlibraryglobal{FP_FAST_FMAF}%
\indexlibraryglobal{FP_FAST_FMAL}%
\indexlibraryglobal{FP_ILOGB0}%
\indexlibraryglobal{FP_ILOGBNAN}%
\indexlibraryglobal{FP_INFINITE}%
\indexlibraryglobal{FP_NAN}%
\indexlibraryglobal{FP_NORMAL}%
\indexlibraryglobal{FP_SUBNORMAL}%
\indexlibraryglobal{FP_ZERO}%
\indexlibraryglobal{HUGE_VAL}%
\indexlibraryglobal{HUGE_VALF}%
\indexlibraryglobal{HUGE_VALL}%
\indexlibraryglobal{INFINITY}%
\indexlibraryglobal{MATH_ERREXCEPT}%
\indexlibraryglobal{MATH_ERRNO}%
\indexlibraryglobal{NAN}%
\indexlibraryglobal{abs}%
\indexlibraryglobal{acos}%
\indexlibraryglobal{acosf}%
Expand Down Expand Up @@ -9273,7 +9245,6 @@
\indexlibraryglobal{lround}%
\indexlibraryglobal{lroundf}%
\indexlibraryglobal{lroundl}%
\indexlibraryglobal{math_errhandling}%
\indexlibraryglobal{modf}%
\indexlibraryglobal{modff}%
\indexlibraryglobal{modfl}%
Expand Down Expand Up @@ -9338,25 +9309,25 @@
using double_t = @\seebelow@;
}

#define HUGE_VAL @\seebelow@
#define HUGE_VALF @\seebelow@
#define HUGE_VALL @\seebelow@
#define INFINITY @\seebelow@
#define NAN @\seebelow@
#define FP_INFINITE @\seebelow@
#define FP_NAN @\seebelow@
#define FP_NORMAL @\seebelow@
#define FP_SUBNORMAL @\seebelow@
#define FP_ZERO @\seebelow@
#define FP_FAST_FMA @\seebelow@
#define FP_FAST_FMAF @\seebelow@
#define FP_FAST_FMAL @\seebelow@
#define FP_ILOGB0 @\seebelow@
#define FP_ILOGBNAN @\seebelow@
#define MATH_ERRNO @\seebelow@
#define MATH_ERREXCEPT @\seebelow@

#define math_errhandling @\seebelow@
#define @\libmacro{HUGE_VAL}@ @\seebelow@
#define @\libmacro{HUGE_VALF}@ @\seebelow@
#define @\libmacro{HUGE_VALL}@ @\seebelow@
#define @\libmacro{INFINITY}@ @\seebelow@
#define @\libmacro{NAN}@ @\seebelow@
#define @\libmacro{FP_INFINITE}@ @\seebelow@
#define @\libmacro{FP_NAN}@ @\seebelow@
#define @\libmacro{FP_NORMAL}@ @\seebelow@
#define @\libmacro{FP_SUBNORMAL}@ @\seebelow@
#define @\libmacro{FP_ZERO}@ @\seebelow@
#define @\libmacro{FP_FAST_FMA}@ @\seebelow@
#define @\libmacro{FP_FAST_FMAF}@ @\seebelow@
#define @\libmacro{FP_FAST_FMAL}@ @\seebelow@
#define @\libmacro{FP_ILOGB0}@ @\seebelow@
#define @\libmacro{FP_ILOGBNAN}@ @\seebelow@
#define @\libmacro{MATH_ERRNO}@ @\seebelow@
#define @\libmacro{MATH_ERREXCEPT}@ @\seebelow@

#define @\libmacro{math_errhandling}@ @\seebelow@

namespace std {
constexpr @\placeholdernc{floating-point-type}@ acos(@\placeholdernc{floating-point-type}@ x);
Expand Down Expand Up @@ -18954,7 +18925,7 @@

\indexheader{stdckdint.h}%
\begin{codeblock}
#define @\libglobal{__STDC_VERSION_STDCKDINT_H__}@ 202311L
#define @\libmacro{__STDC_VERSION_STDCKDINT_H__}@ 202311L

template<class type1, class type2, class type3>
bool ckd_add(type1* result, type2 a, type3 b);
Expand Down
Loading