diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-07-21 07:10:36 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-07-21 07:10:36 +0000 |
commit | 19fafbd363af0c07562e77595fc94ad786c4e00f (patch) | |
tree | d19f337e85d3fb553f6806af5174bc4df981e7c8 /gcc/rtl.c | |
parent | 0dcbd3b4c4705dde230ddad2938b4d54344725d6 (diff) | |
download | gcc-19fafbd363af0c07562e77595fc94ad786c4e00f.tar.gz |
* diagnostic.c (trim_filename, fancy_abort): Moved here from
rtl.c.
(fatal_function, set_fatal_function): Removed.
(fatal): Don't prepare for or call the fatal_function.
(diagnostic_lock, error_recursion): New.
(diagnostic_for_decl, report_diagnostic): Guard against
re-entering the error reporting routines.
(fancy_abort): Assume function is not NULL.
* errors.c (fancy_abort): New. Assume function is not NULL.
* tradcpp.c (fancy_abort): Assume function is not NULL.
* system.h: Provide default definition of __FUNCTION__.
* rtl.h: Use __FUNCTION__ not __PRETTY_FUNCTION__ throughout.
Always use __FUNCTION__ in definition of abort.
* tree.h: Likewise.
* varray.h: Likewise.
* toplev.h: Likewise. Don't prototype set_fatal_function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35170 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/rtl.c')
-rw-r--r-- | gcc/rtl.c | 47 |
1 files changed, 1 insertions, 46 deletions
diff --git a/gcc/rtl.c b/gcc/rtl.c index 6c771f695e4..91b38cb91fd 100644 --- a/gcc/rtl.c +++ b/gcc/rtl.c @@ -265,7 +265,7 @@ static void fatal_with_file_and_line PARAMS ((FILE *, const char *, ...)) ATTRIBUTE_PRINTF_2 ATTRIBUTE_NORETURN; static void fatal_expected_char PARAMS ((FILE *, int, int)) ATTRIBUTE_NORETURN; static void read_name PARAMS ((char *, FILE *)); -static const char *trim_filename PARAMS ((const char *)); + /* Allocate an rtx vector of N elements. Store the length, and initialize all elements to zero. */ @@ -1196,48 +1196,3 @@ rtvec_check_failed_bounds (r, n, file, line, func) fancy_abort (file, line, func); } #endif /* ENABLE_RTL_CHECKING */ - -/* These are utility functions used by fatal-error functions all over the - code. rtl.c happens to be linked by all the programs that need them, - so these are here. In the future we want to break out all error handling - to its own module. */ - -/* Given a partial pathname as input, return another pathname that - shares no directory elements with the pathname of __FILE__. This - is used by fancy_abort() to print `Internal compiler error in expr.c' - instead of `Internal compiler error in ../../egcs/gcc/expr.c'. */ -static const char * -trim_filename (name) - const char *name; -{ - static const char this_file[] = __FILE__; - const char *p = name, *q = this_file; - - while (*p == *q && *p != 0 && *q != 0) p++, q++; - while (p > name && p[-1] != DIR_SEPARATOR -#ifdef DIR_SEPARATOR_2 - && p[-1] != DIR_SEPARATOR_2 -#endif - ) - p--; - - return p; -} - -/* Report an internal compiler error in a friendly manner and without - dumping core. */ - -void -fancy_abort (file, line, function) - const char *file; - int line; - const char *function; -{ - if (function == NULL) - function = "?"; - fatal ( -"Internal compiler error in `%s', at %s:%d\n\ -Please submit a full bug report.\n\ -See %s for instructions.", - function, trim_filename (file), line, GCCBUGURL); -} |