Ensure assert_fail and abort have noreturn attribute
This commit is contained in:
@@ -1,16 +1,14 @@
|
||||
#ifndef _BITS_STDLIB_H
|
||||
#define _BITS_STDLIB_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
// C++ needs abort to be a function, and cannot use this
|
||||
#ifndef __cplusplus
|
||||
// Override abort function with detailed abort in C
|
||||
#define abort() __abort(__func__, __FILE__, __LINE__)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
// C++ needs abort to be a function, define backup function
|
||||
void abort(void);
|
||||
#else
|
||||
// C uses detailed abort macro
|
||||
#define abort() __abort(__func__, __FILE__, __LINE__)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
long double strtold(const char *nptr, char **endptr);
|
||||
|
||||
Reference in New Issue
Block a user