diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2001-02-23 21:17:06 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2001-02-23 16:17:06 -0500 |
commit | fce687f8769fbad7fba74cf9adb985dd5369df01 (patch) | |
tree | 08218de6e8087c64395c199b03e38311bb54c54d /gcc | |
parent | 3cc247a81a4e4ed0abb83a096333671f882d15ff (diff) | |
download | gcc-fce687f8769fbad7fba74cf9adb985dd5369df01.zip gcc-fce687f8769fbad7fba74cf9adb985dd5369df01.tar.gz gcc-fce687f8769fbad7fba74cf9adb985dd5369df01.tar.bz2 |
diagnostic.c (trim_filename): No longer static.
* diagnostic.c (trim_filename): No longer static.
* toplev.h (trim_filename): Declare.
* rtl.c (rtl_check_failed_bounds): Call internal_error.
(rtl_check_failed_type1, rtl_check_failed_type2): Likewise.
(rtl_check_failed_code1, rtl_check_failed_code2): Likewise.
(rtvec_check_failed_bounds): Likewise.
* tree.c (tree_check_failed, tree_class_check_failed): Likewise.
From-SVN: r40016
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/diagnostic.c | 3 | ||||
-rw-r--r-- | gcc/rtl.c | 42 | ||||
-rw-r--r-- | gcc/toplev.h | 1 | ||||
-rw-r--r-- | gcc/tree.c | 14 |
5 files changed, 39 insertions, 29 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1daa849..43ce072 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,13 @@ Fri Feb 23 15:28:39 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + * diagnostic.c (trim_filename): No longer static. + * toplev.h (trim_filename): Declare. + * rtl.c (rtl_check_failed_bounds): Call internal_error. + (rtl_check_failed_type1, rtl_check_failed_type2): Likewise. + (rtl_check_failed_code1, rtl_check_failed_code2): Likewise. + (rtvec_check_failed_bounds): Likewise. + * tree.c (tree_check_failed, tree_class_check_failed): Likewise. + * convert.c (convert_to_integer): Don't do unsigned unless result or both inputs are unsigned. diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c index 24aa348..1863a2c 100644 --- a/gcc/diagnostic.c +++ b/gcc/diagnostic.c @@ -104,7 +104,6 @@ static void default_diagnostic_finalizer PARAMS ((output_buffer *, diagnostic_context *)); static void error_recursion PARAMS ((void)) ATTRIBUTE_NORETURN; -static const char *trim_filename PARAMS ((const char *)); extern int rtl_dump_and_exit; extern int inhibit_warnings; @@ -1716,7 +1715,7 @@ error_recursion () is used by fancy_abort() to print `Internal compiler error in expr.c' instead of `Internal compiler error in ../../GCC/gcc/expr.c'. */ -static const char * +const char * trim_filename (name) const char *name; { @@ -1285,9 +1285,10 @@ rtl_check_failed_bounds (r, n, file, line, func) int line; const char *func; { - error ("RTL check: access of elt %d of `%s' with last elt %d", - n, GET_RTX_NAME (GET_CODE (r)), GET_RTX_LENGTH (GET_CODE (r))-1); - fancy_abort (file, line, func); + internal_error + ("RTL check: access of elt %d of `%s' with last elt %d in %s, at %s:%d", + n, GET_RTX_NAME (GET_CODE (r)), GET_RTX_LENGTH (GET_CODE (r)) - 1, + func, trim_filename (file), line); } void @@ -1299,9 +1300,10 @@ rtl_check_failed_type1 (r, n, c1, file, line, func) int line; const char *func; { - error ("RTL check: expected elt %d type '%c', have '%c' (rtx %s)", - n, c1, GET_RTX_FORMAT (GET_CODE (r))[n], GET_RTX_NAME (GET_CODE (r))); - fancy_abort (file, line, func); + internal_error + ("RTL check: expected elt %d type '%c', have '%c' (rtx %s) in %s, at %s:%d", + n, c1, GET_RTX_FORMAT (GET_CODE (r))[n], GET_RTX_NAME (GET_CODE (r)), + func, trim_filename (file), line); } void @@ -1314,10 +1316,10 @@ rtl_check_failed_type2 (r, n, c1, c2, file, line, func) int line; const char *func; { - error ("RTL check: expected elt %d type '%c' or '%c', have '%c' (rtx %s)", - n, c1, c2, - GET_RTX_FORMAT (GET_CODE (r))[n], GET_RTX_NAME (GET_CODE(r))); - fancy_abort (file, line, func); + internal_error + ("RTL check: expected elt %d type '%c' or '%c', have '%c' (rtx %s) in %s, at %s:%d", + n, c1, c2, GET_RTX_FORMAT (GET_CODE (r))[n], GET_RTX_NAME (GET_CODE (r)), + func, trim_filename (file), line); } void @@ -1328,9 +1330,9 @@ rtl_check_failed_code1 (r, code, file, line, func) int line; const char *func; { - error ("RTL check: expected code `%s', have `%s'", - GET_RTX_NAME (code), GET_RTX_NAME (GET_CODE (r))); - fancy_abort (file, line, func); + internal_error ("RTL check: expected code `%s', have `%s' in %s, at %s:%d", + GET_RTX_NAME (code), GET_RTX_NAME (GET_CODE (r)), func, + trim_filename (file), line); } void @@ -1341,10 +1343,10 @@ rtl_check_failed_code2 (r, code1, code2, file, line, func) int line; const char *func; { - error ("RTL check: expected code `%s' or `%s', have `%s'", - GET_RTX_NAME (code1), GET_RTX_NAME (code2), - GET_RTX_NAME (GET_CODE (r))); - fancy_abort (file, line, func); + internal_error + ("RTL check: expected code `%s' or `%s', have `%s' in %s, at %s:%d", + GET_RTX_NAME (code1), GET_RTX_NAME (code2), GET_RTX_NAME (GET_CODE (r)), + ffunc, trim_filename (file), line); } /* XXX Maybe print the vector? */ @@ -1356,8 +1358,8 @@ rtvec_check_failed_bounds (r, n, file, line, func) int line; const char *func; { - error ("RTL check: access of elt %d of vector with last elt %d", - n, GET_NUM_ELEM (r)-1); - fancy_abort (file, line, func); + internal_error + ("RTL check: access of elt %d of vector with last elt %d in %s, at %s:%d", + n, GET_NUM_ELEM (r) - 1, func, trim_filename (file), line); } #endif /* ENABLE_RTL_CHECKING */ diff --git a/gcc/toplev.h b/gcc/toplev.h index dc36dd5..44772f3 100644 --- a/gcc/toplev.h +++ b/gcc/toplev.h @@ -42,6 +42,7 @@ extern void debug_end_source_file PARAMS ((unsigned)); extern void debug_define PARAMS ((unsigned, const char *)); extern void debug_undef PARAMS ((unsigned, const char *)); extern int debug_ignore_block PARAMS ((union tree_node *)); +extern const char *trim_filename PARAMS ((const char *)); extern void internal_error PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN; @@ -4663,9 +4663,9 @@ tree_check_failed (node, code, file, line, function) int line; const char *function; { - error ("Tree check: expected %s, have %s", - tree_code_name[code], tree_code_name[TREE_CODE (node)]); - fancy_abort (file, line, function); + internal_error ("Tree check: expected %s, have %s in %s, at %s:%d", + tree_code_name[code], tree_code_name[TREE_CODE (node)], + function, trim_filename (file), line); } /* Similar to above, except that we check for a class of tree @@ -4679,10 +4679,10 @@ tree_class_check_failed (node, cl, file, line, function) int line; const char *function; { - error ("Tree check: expected class '%c', have '%c' (%s)", - cl, TREE_CODE_CLASS (TREE_CODE (node)), - tree_code_name[TREE_CODE (node)]); - fancy_abort (file, line, function); + internal_error + ("Tree check: expected class '%c', have '%c' (%s) in %s, at %s:%d", + cl, TREE_CODE_CLASS (TREE_CODE (node)), + tree_code_name[TREE_CODE (node)], function, trim_filename (file), line); } #endif /* ENABLE_TREE_CHECKING */ |