diff options
author | Ben Elliston <bje@au.ibm.com> | 2006-02-03 11:56:58 +0000 |
---|---|---|
committer | Ben Elliston <bje@gcc.gnu.org> | 2006-02-03 22:56:58 +1100 |
commit | ab184b2a8fed51da5abc8af01a3258b9090f4aaf (patch) | |
tree | 40ce1ffcebc96077b6c41500950d3961b6d3e03e /gcc/java/typeck.c | |
parent | 4a6c754b7a63dc27eda74622783b059029f85eb3 (diff) | |
download | gcc-ab184b2a8fed51da5abc8af01a3258b9090f4aaf.zip gcc-ab184b2a8fed51da5abc8af01a3258b9090f4aaf.tar.gz gcc-ab184b2a8fed51da5abc8af01a3258b9090f4aaf.tar.bz2 |
java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
* java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
* typeck.c: Likewise.
* verify-impl.c: Likewise.
* class.c: Likewise.
* decl.c: Likewise.
* jcf-parse.c: Likewise.
* constants.c: Likewise.
* check-init.c: Likewise.
* jcf-write.c: Likewise.
* verify-glue.c: Likewise.
* mangle.c: Likewise.
* expr.c: Likewise.
* lang.c: Likewise.
* boehm.c: Likewise.
From-SVN: r110541
Diffstat (limited to 'gcc/java/typeck.c')
-rw-r--r-- | gcc/java/typeck.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/gcc/java/typeck.c b/gcc/java/typeck.c index 2bafd84..737ca18 100644 --- a/gcc/java/typeck.c +++ b/gcc/java/typeck.c @@ -55,8 +55,7 @@ set_local_type (int slot, tree type) int max_locals = DECL_MAX_LOCALS(current_function_decl); int nslots = TYPE_IS_WIDE (type) ? 2 : 1; - if (slot < 0 || slot + nslots - 1 >= max_locals) - abort (); + gcc_assert (slot >= 0 && (slot + nslots - 1 < max_locals)); type_map[slot] = type; while (--nslots > 0) @@ -458,9 +457,7 @@ static tree parse_signature_type (const unsigned char **ptr, const unsigned char *limit) { tree type; - - if (*ptr >= limit) - abort (); + gcc_assert (*ptr < limit); switch (**ptr) { @@ -484,8 +481,7 @@ parse_signature_type (const unsigned char **ptr, const unsigned char *limit) const unsigned char *str = start; for ( ; ; str++) { - if (str >= limit) - abort (); + gcc_assert (str < limit); if (*str == ';') break; } @@ -494,7 +490,7 @@ parse_signature_type (const unsigned char **ptr, const unsigned char *limit) break; } default: - abort (); + gcc_unreachable (); } return promote_type (type); } @@ -662,7 +658,7 @@ build_java_signature (tree type) break; bad_type: default: - abort (); + gcc_unreachable (); } TYPE_SIGNATURE (type) = sig; } |