A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://timsong-cpp.github.io/cppwp/n4659/support.runtime below:

[support.runtime]

21 Language support library [language.support] 21.10 Other runtime support [support.runtime]

Headers <csetjmp> (nonlocal jumps), <csignal> (signal handling), <cstdarg> (variable arguments), and <cstdlib> (runtime environment getenv, system), provide further compatibility with C code.

Calls to the function getenv shall not introduce a data race ([res.on.data.races]) provided that nothing modifies the environment. [Note: Calls to the POSIX functions setenv and putenv modify the environment. end note]

A call to the setlocale function may introduce a data race with other calls to the setlocale function or with calls to functions that are affected by the current C locale. The implementation shall behave as if no library function other than locale​::​global calls the setlocale function.

21.10.1 Header <cstdarg> synopsis [cstdarg.syn]
namespace std {
  using va_­list = see below;
}

#define va_­arg(V, P) see below
#define va_­copy(VDST, VSRC) see below
#define va_­end(V) see below
#define va_­start(V, P) see below

The contents of the header <cstdarg> are the same as the C standard library header <stdarg.h>, with the following changes: The restrictions that ISO C places on the second parameter to the va_­start macro in header <stdarg.h> are different in this International Standard. The parameter parmN is the rightmost parameter in the variable parameter list of the function definition (the one just before the ...).219 If the parameter parmN is a pack expansion ([temp.variadic]) or an entity resulting from a lambda capture ([expr.prim.lambda]), the program is ill-formed, no diagnostic required. If the parameter parmN is of a reference type, or of a type that is not compatible with the type that results when passing an argument for which there is no parameter, the behavior is undefined.

See also: ISO C 7.16.1.1.

21.10.2 Header <csetjmp> synopsis [csetjmp.syn]
namespace std {
  using jmp_buf = see below;
  [[noreturn]] void longjmp(jmp_buf env, int val);
}

#define setjmp(env) see below

The contents of the header <csetjmp> are the same as the C standard library header <setjmp.h>.

The function signature longjmp(jmp_­buf jbuf, int val) has more restricted behavior in this International Standard. 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 automatic objects.

See also: ISO C 7.13.

21.10.3 Header <csignal> synopsis [csignal.syn]
namespace std {
  using sig_atomic_t = see below;

    extern "C" using signal-handler = void(int);    signal-handler* signal(int sig, signal-handler* func);

  int raise(int sig);
}

#define SIG_DFL see below
#define SIG_ERR see below
#define SIG_IGN see below
#define SIGABRT see below
#define SIGFPE see below
#define SIGILL see below
#define SIGINT see below
#define SIGSEGV see below
#define SIGTERM see below

The contents of the header <csignal> are the same as the C standard library header <signal.h>.

21.10.4 Signal handlers [support.signal]

A call to the function signal synchronizes with any resulting invocation of the signal handler so installed.

A plain lock-free atomic operation is an invocation of a function f from Clause [atomics], such that:

An evaluation is signal-safe unless it includes one of the following:

A signal handler invocation has undefined behavior if it includes an evaluation that is not signal-safe.

The function signal is signal-safe if it is invoked with the first argument equal to the signal number corresponding to the signal that caused the invocation of the handler.

See also: ISO C 7.14.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4