aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLexi Winter <lexi@le-Fay.ORG>2024-02-02 16:41:40 +0000
committerWarner Losh <imp@FreeBSD.org>2024-02-02 18:11:17 +0000
commitc27a89971805b176dcfa5a234f2ea6f6109d0a70 (patch)
tree95ac62526de16e84167b9498e7fc05728751481d /include
parent02b0d4b688cc4deb14cb6e7534a2a4958e48b753 (diff)
downloadsrc-c27a89971805b176dcfa5a234f2ea6f6109d0a70.tar.gz
src-c27a89971805b176dcfa5a234f2ea6f6109d0a70.zip
stdlib.h: add __noexcept to prototypes
The noexcept specifier is required on these functions in C++: _Exit(), atexit(), quick_exit(), at_quick_exit(), abort(). MFC after: 2 weeks Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1085
Diffstat (limited to 'include')
-rw-r--r--include/stdlib.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/stdlib.h b/include/stdlib.h
index ff8991d1fa94..f0687f01e6c7 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -84,9 +84,9 @@ extern int __mb_cur_max;
extern int ___mb_cur_max(void);
#define MB_CUR_MAX ((size_t)___mb_cur_max())
-_Noreturn void abort(void);
+_Noreturn void abort(void) __noexcept;
int abs(int) __pure2;
-int atexit(void (* _Nonnull)(void));
+int atexit(void (* _Nonnull)(void)) __noexcept;
double atof(const char *);
int atoi(const char *);
long atol(const char *);
@@ -154,7 +154,7 @@ unsigned long long
strtoull(const char * __restrict, char ** __restrict, int);
#endif /* __LONG_LONG_SUPPORTED */
-_Noreturn void _Exit(int);
+_Noreturn void _Exit(int) __noexcept;
#endif /* __ISO_C_VISIBLE >= 1999 */
/*
@@ -163,9 +163,9 @@ _Noreturn void _Exit(int);
#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L
void * aligned_alloc(size_t, size_t) __malloc_like __alloc_align(1)
__alloc_size(2);
-int at_quick_exit(void (*)(void));
+int at_quick_exit(void (*)(void)) __noexcept;
_Noreturn void
- quick_exit(int);
+ quick_exit(int) __noexcept;
#endif /* __ISO_C_VISIBLE >= 2011 */
/*
* Extensions made by POSIX relative to C.