diff options
Diffstat (limited to 'gdbsupport/errors.h')
-rw-r--r-- | gdbsupport/errors.h | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/gdbsupport/errors.h b/gdbsupport/errors.h index d8daed0..c0747f8 100644 --- a/gdbsupport/errors.h +++ b/gdbsupport/errors.h @@ -36,11 +36,10 @@ extern void vwarning (const char *fmt, va_list args) a printf- or vprintf-style argument list. These functions do not return. The function "verror" must be provided by the client. */ -extern void error (const char *fmt, ...) - ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (1, 2); +[[noreturn]] extern void error (const char *fmt, ...) ATTRIBUTE_PRINTF (1, 2); -extern void verror (const char *fmt, va_list args) - ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (1, 0); +[[noreturn]] extern void verror (const char *fmt, va_list args) + ATTRIBUTE_PRINTF (1, 0); /* An internal error was detected. Internal errors indicate programming errors such as assertion failures, as opposed to @@ -53,16 +52,16 @@ extern void verror (const char *fmt, va_list args) automatically. The function "internal_verror" must be provided by the client. */ -extern void internal_error_loc (const char *file, int line, - const char *fmt, ...) - ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (3, 4); +[[noreturn]] extern void internal_error_loc (const char *file, int line, + const char *fmt, ...) + ATTRIBUTE_PRINTF (3, 4); #define internal_error(fmt, ...) \ internal_error_loc (__FILE__, __LINE__, fmt, ##__VA_ARGS__) -extern void internal_verror (const char *file, int line, - const char *fmt, va_list args) - ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (3, 0); +[[noreturn]] extern void internal_verror (const char *file, int line, + const char *fmt, va_list args) + ATTRIBUTE_PRINTF (3, 0); /* An internal problem was detected, but the requested operation can still proceed. Internal warnings indicate programming errors as @@ -93,14 +92,13 @@ extern std::string perror_string (const char *prefix, int errnum = 0); STRING with the system error message for errno. If ERRNUM is given, then use it in place of errno. This function does not return. */ -extern void perror_with_name (const char *string, int errnum = 0) - ATTRIBUTE_NORETURN; +[[noreturn]] extern void perror_with_name (const char *string, int errnum = 0); /* Call this function to handle memory allocation failures. This function does not return. This function must be provided by the client. */ -extern void malloc_failure (long size) ATTRIBUTE_NORETURN; +[[noreturn]] extern void malloc_failure (long size); /* Flush stdout and stderr. Must be provided by the client. */ @@ -124,8 +122,8 @@ extern const char *strwinerror (ULONGEST error); including STRING and the system text for the given error number. */ -extern void throw_winerror_with_name (const char *string, ULONGEST err) - ATTRIBUTE_NORETURN; +[[noreturn]] extern void throw_winerror_with_name (const char *string, + ULONGEST err); #endif /* USE_WIN32API */ |