[PR target/115123] Fix testsuite fallout from sinking heuristic change
[gcc.git] / libphobos / libdruntime / core / stdc / assert_.d
blobac237d9c8975f810e589908c73f2723fc7ef3c44
1 /**
2 * D header file for C99.
4 * $(C_HEADER_DESCRIPTION pubs.opengroup.org/onlinepubs/009695399/basedefs/_assert.h.html, _assert.h)
6 * License: Distributed under the
7 * $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0).
8 * (See accompanying file LICENSE)
9 * Source: $(DRUNTIMESRC core/stdc/_assert_.d)
10 * Standards: ISO/IEC 9899:1999 (E)
13 /****************************
14 * These are the various functions called by the assert() macro.
17 module core.stdc.assert_;
19 version (OSX)
20 version = Darwin;
21 else version (iOS)
22 version = Darwin;
23 else version (TVOS)
24 version = Darwin;
25 else version (WatchOS)
26 version = Darwin;
28 extern (C):
29 @trusted:
30 nothrow:
31 @nogc:
33 version (CRuntime_Microsoft)
35 /***
36 * Assert failure function in the Microsoft C library.
37 * `_assert` is not in assert.h, but it is in the library.
39 noreturn _wassert(const(wchar)* exp, const(wchar)* file, uint line);
40 ///
41 noreturn _assert(const(char)* exp, const(char)* file, uint line);
43 else version (Darwin)
45 /***
46 * Assert failure function in the Darwin C library.
48 noreturn __assert_rtn(const(char)* func, const(char)* file, uint line, const(char)* exp);
50 else version (FreeBSD)
52 /***
53 * Assert failure function in the FreeBSD C library.
55 noreturn __assert(const(char)* func, const(char)* file, uint line, const(char)* exp);
57 else version (NetBSD)
59 /***
60 * Assert failure function in the NetBSD C library.
62 noreturn __assert(const(char)* file, int line, const(char)* exp);
63 ///
64 noreturn __assert13(const(char)* file, int line, const(char)* func, const(char)* exp);
66 else version (OpenBSD)
68 /***
69 * Assert failure function in the OpenBSD C library.
71 noreturn __assert(const(char)* file, int line, const(char)* exp);
72 ///
73 noreturn __assert2(const(char)* file, int line, const(char)* func, const(char)* exp);
75 else version (DragonFlyBSD)
77 /***
78 * Assert failure function in the DragonFlyBSD C library.
80 noreturn __assert(const(char)* func, const(char)* file, uint line, const(char)* exp);
82 else version (CRuntime_Glibc)
84 /***
85 * Assert failure functions in the GLIBC library.
87 noreturn __assert(const(char)* exp, const(char)* file, uint line);
88 ///
89 noreturn __assert_fail(const(char)* exp, const(char)* file, uint line, const(char)* func);
90 ///
91 noreturn __assert_perror_fail(int errnum, const(char)* file, uint line, const(char)* func);
93 else version (CRuntime_Bionic)
95 /***
96 * Assert failure functions in the Bionic library.
98 noreturn __assert(const(char)* __file, int __line, const(char)* __msg);
99 ///
100 noreturn __assert2(const(char)* __file, int __line, const(char)* __function, const(char)* __msg);
102 else version (CRuntime_Musl)
104 /***
105 * Assert failure function in the Musl C library.
107 noreturn __assert_fail(const(char)* exp, const(char)* file, uint line, const(char)* func);
109 else version (CRuntime_Newlib)
111 /***
112 * Assert failure function in the Newlib library.
114 noreturn __assert(const(char)* file, int line, const(char)* exp);
116 noreturn __assert_func(const(char)* file, int line, const(char)* func, const(char)* exp);
118 else version (CRuntime_UClibc)
120 noreturn __assert(const(char)* exp, const(char)* file, uint line, const(char)* func);
122 else version (Solaris)
124 noreturn __assert_c99(const(char)* exp, const(char)* file, uint line, const(char)* func);
126 else
128 static assert(0);