summaryrefslogtreecommitdiff
path: root/gcc/protoize.c
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2005-04-03 10:27:51 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2005-04-03 10:27:51 +0000
commit876760f64a4f5dff31960d263599835694f7698a (patch)
tree42e511f518e210b0b0c5e1e5363178088482aec3 /gcc/protoize.c
parentb6a753667ad2f372afc8e8d8bacbcc8fe47556cf (diff)
downloadgcc-876760f64a4f5dff31960d263599835694f7698a.tar.gz
* params.c (set_param_value): Use gcc_assert & gcc_unreachable.
* passes.c (open_dump_file, rest_of_handle_final): Likewise. * postreload-gcse.c (expr_equiv_p, oprs_unchanged_p, hash_scan_set, reg_set_between_after_reload_p, reg_used_between_after_reload_p, get_avail_load_store_reg, eliminate_partially_redundant_load): Likewise. * postreload.c (reload_cse_simplify_set, reload_combine_note_use): Likewise. * predict.c (predict_insn, expected_value_to_br_prob, propagate_freq, expensive_function_p): Likewise. * print-rtl.c (print_rtx): Likewise. * profile.c (instrument_edges, instrument_values, compute_branch_probabilities, branch_prob, union_groups, tree_register_profile_hooks, rtl_register_profile_hooks): Likewise. * protoize.c (in_system_include_dir, file_could_be_converted, file_normally_convertible, gen_aux_info_file, seek_to_line, do_cleaning): Likewise. * tree-ssa-alias.c (collect_points_to_info_r): Likewise. * tree-ssa-ccp.c (execute_fold_all_builtins): Likewise. * tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97485 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/protoize.c')
-rw-r--r--gcc/protoize.c37
1 files changed, 15 insertions, 22 deletions
diff --git a/gcc/protoize.c b/gcc/protoize.c
index 093e4400817..b9e100c7fc7 100644
--- a/gcc/protoize.c
+++ b/gcc/protoize.c
@@ -34,7 +34,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
-#undef abort
#include "version.h"
/* Include getopt.h for the sake of getopt_long. */
@@ -641,8 +640,7 @@ in_system_include_dir (const char *path)
{
const struct default_include *p;
- if (! IS_ABSOLUTE_PATH (path))
- abort (); /* Must be an absolutized filename. */
+ gcc_assert (IS_ABSOLUTE_PATH (path));
for (p = cpp_include_defaults; p->fname; p++)
if (!strncmp (path, p->fname, strlen (p->fname))
@@ -679,10 +677,8 @@ file_could_be_converted (const char *path)
dir_last_slash = slash;
}
#endif
- if (dir_last_slash)
- *dir_last_slash = '\0';
- else
- abort (); /* Should have been an absolutized filename. */
+ gcc_assert (dir_last_slash);
+ *dir_last_slash = '\0';
}
if (access (path, W_OK))
@@ -723,10 +719,8 @@ file_normally_convertible (const char *path)
dir_last_slash = slash;
}
#endif
- if (dir_last_slash)
- *dir_last_slash = '\0';
- else
- abort (); /* Should have been an absolutized filename. */
+ gcc_assert (dir_last_slash);
+ *dir_last_slash = '\0';
}
if (access (path, R_OK))
@@ -1930,7 +1924,7 @@ gen_aux_info_file (const char *base_filename)
}
return 1;
}
- abort ();
+ gcc_unreachable ();
}
}
@@ -2742,8 +2736,7 @@ check_source (int cond, const char *clean_p)
static const char *
seek_to_line (int n)
{
- if (n < last_known_line_number)
- abort ();
+ gcc_assert (n >= last_known_line_number);
while (n > last_known_line_number)
{
@@ -3670,8 +3663,8 @@ do_cleaning (char *new_clean_text_base, const char *new_clean_text_limit)
{
if (!ISSPACE ((const unsigned char)*scan_p))
*scan_p = ' ';
- if (++scan_p >= new_clean_text_limit)
- abort ();
+ ++scan_p;
+ gcc_assert (scan_p < new_clean_text_limit);
}
*scan_p++ = ' ';
*scan_p = ' ';
@@ -3685,8 +3678,8 @@ do_cleaning (char *new_clean_text_base, const char *new_clean_text_limit)
{
if (!ISSPACE ((const unsigned char)*scan_p))
*scan_p = ' ';
- if (++scan_p >= new_clean_text_limit)
- abort ();
+ ++scan_p;
+ gcc_assert (scan_p < new_clean_text_limit);
}
*scan_p++ = ' ';
break;
@@ -3700,8 +3693,8 @@ do_cleaning (char *new_clean_text_base, const char *new_clean_text_limit)
scan_p[1] = ' ';
if (!ISSPACE ((const unsigned char)*scan_p))
*scan_p = ' ';
- if (++scan_p >= new_clean_text_limit)
- abort ();
+ ++scan_p;
+ gcc_assert (scan_p < new_clean_text_limit);
}
*scan_p++ = ' ';
break;
@@ -3715,8 +3708,8 @@ do_cleaning (char *new_clean_text_base, const char *new_clean_text_limit)
scan_p[1] = ' ';
if (!ISSPACE ((const unsigned char)*scan_p))
*scan_p = ' ';
- if (++scan_p >= new_clean_text_limit)
- abort ();
+ ++scan_p;
+ gcc_assert (scan_p < new_clean_text_limit);
}
if (!ISSPACE ((const unsigned char)*scan_p))
*scan_p = ' ';