Files
2025-10-25 03:02:53 +03:00

62 lines
2.2 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[library.c]
# 16 Library introduction [[library]](./#library)
## 16.2 The C standard library [library.c]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L136)
The C++ standard library also makes available the facilities of the C standard library,suitably adjusted to ensure static type safety[.](#1.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L141)
The descriptions of many library functions rely on the C standard library for
the semantics of those functions[.](#2.sentence-1)
In some cases,
the signatures specified in this document
may be different from the signatures in the C standard library,
and additional overloads may be declared in this document,
but the behavior and the preconditions
(including any preconditions implied by the use of
a C restrict qualifier)
are the same unless otherwise stated[.](#2.sentence-2)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L153)
A call to a C standard library function is
a non-constant library call ([[defns.nonconst.libcall]](defns.nonconst.libcall "3.35non-constant library call"))
if it raises a floating-point exception other than FE_INEXACT[.](#3.sentence-1)
The semantics of a call to a C standard library function
evaluated as a core constant expression
are those specified in ISO/IEC 9899:2024, Annex F[131](#footnote-131 "See also ISO/IEC 9899:2024, 7.6.") to the extent applicable to the floating-point types ([[basic.fundamental]](basic.fundamental "6.9.2Fundamental types"))
that are parameter types of the called function[.](#3.sentence-2)
[*Note [1](#note-1)*:
ISO/IEC 9899:2024, Annex F specifies
the conditions under which floating-point exceptions are raised and
the behavior when NaNs and/or infinities are passed as arguments[.](#3.sentence-3)
— *end note*]
[*Note [2](#note-2)*:
Equivalently, a call to a C standard library function is
a non-constant library call
if errno is set
when math_errhandling & MATH_ERRNO is true[.](#3.sentence-4)
— *end note*]
[131)](#footnote-131)[131)](#footnoteref-131)
See also ISO/IEC 9899:2024, 7.6[.](#footnote-131.sentence-1)