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

34 lines
1.3 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.

[csetjmp.syn]
# 17 Language support library [[support]](./#support)
## 17.14 Other runtime support [[support.runtime]](support.runtime#csetjmp.syn)
### 17.14.3 Header <csetjmp> synopsis [csetjmp.syn]
[🔗](#lib:jmp_buf)
#define __STDC_VERSION_SETJMP_H__ 202311Lnamespace std {using jmp_buf = *see below*; [[noreturn]] void longjmp(jmp_buf env, int val);}#define setjmp(env) *see below*
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/support.tex#L6431)
The contents of the header <csetjmp> are the same as the C
standard library header [<setjmp.h>](support.c.headers.general#header:%3csetjmp.h%3e "17.15.1General[support.c.headers.general]")[.](#1.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/support.tex#L6435)
The function signaturelongjmp(jmp_buf jbuf, int val) has more restricted behavior in this document[.](#2.sentence-1)
A setjmp/longjmp call pair has undefined
behavior if replacing the setjmp and longjmp by catch and throw would invoke any non-trivial destructors for any objects
with automatic storage duration[.](#2.sentence-2)
A call to setjmp or longjmp has undefined
behavior if invoked in a suspension context of a coroutine ([[expr.await]](expr.await "7.6.2.4Await"))[.](#2.sentence-3)
See also: ISO/IEC 9899:2024, 7.13