diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2022-05-10 15:56:08 +0200 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2022-05-17 16:27:32 +0200 |
commit | cd4a0ddc120936f196e81f8463dd1d4856018112 (patch) | |
tree | b8970a8ce027e7f08d39973fd3fb2777053690ba /gcc/system.h | |
parent | 0f00ebf0d6be944dabf4329bce81a9c063c7ded7 (diff) | |
download | gcc-cd4a0ddc120936f196e81f8463dd1d4856018112.zip gcc-cd4a0ddc120936f196e81f8463dd1d4856018112.tar.gz gcc-cd4a0ddc120936f196e81f8463dd1d4856018112.tar.bz2 |
Advise to call 'internal_error' instead of 'abort' or 'fancy_abort'
gcc/
* diagnostic.cc: Don't advise to call 'abort' instead of
'internal_error'.
* system.h: Advise to call 'internal_error' instead of 'abort' or
'fancy_abort'.
Suggested-by: Richard Biener <richard.guenther@gmail.com>
Diffstat (limited to 'gcc/system.h')
-rw-r--r-- | gcc/system.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/system.h b/gcc/system.h index 1c783c5..67158b7 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -774,8 +774,10 @@ extern int vsnprintf (char *, size_t, const char *, va_list); #endif #endif -/* Redefine abort to report an internal error w/o coredump, and - reporting the location of the error in the source file. */ +/* Redefine 'abort' to report an internal error w/o coredump, and + reporting the location of the error in the source file. + Instead of directly calling 'abort' or 'fancy_abort', GCC code + should normally call 'internal_error' with a specific message. */ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN ATTRIBUTE_COLD; #define abort() fancy_abort (__FILE__, __LINE__, __FUNCTION__) |