diff options
author | Mike Stump <mrs@apple.com> | 2004-07-24 00:03:28 +0000 |
---|---|---|
committer | Mike Stump <mrs@gcc.gnu.org> | 2004-07-24 00:03:28 +0000 |
commit | 0e7d217a97d7002639bad1e6af71cc1021a92ed0 (patch) | |
tree | 0507a167efbef0282a0fc2a3f187f358cfe9b0a3 /gcc/java/jcf-write.c | |
parent | ef05818b76a645f094e89f0804611d19c677f03f (diff) | |
download | gcc-0e7d217a97d7002639bad1e6af71cc1021a92ed0.zip gcc-0e7d217a97d7002639bad1e6af71cc1021a92ed0.tar.gz gcc-0e7d217a97d7002639bad1e6af71cc1021a92ed0.tar.bz2 |
boehm.c (set_bit): Improve type safety wrt unsignedness.
* boehm.c (set_bit): Improve type safety wrt unsignedness.
* gjavah.c (throwable_p, decode_signature_piece,
print_full_cxx_name, print_include, add_namelet, add_class_decl,
process_file): Likewise.
* jcf-dump.c (main): Likewise.
* jcf-io.c (read_zip_member): Likewise.
* jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
give_name_to_class, get_class_constant): Likewise.
* jcf-write.c (find_constant_wide, push_long_const,
generate_classfile): Likewise.
* lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
* parse.y (read_import_dir): Likewise.
* typeck.c (parse_signature_type): Likewise.
* verify.c (verify_jvm_instructions): Likewise.
* zextract.c (find_zip_file_start, read_zip_archive): Likewise.
From-SVN: r85102
Diffstat (limited to 'gcc/java/jcf-write.c')
-rw-r--r-- | gcc/java/jcf-write.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/gcc/java/jcf-write.c b/gcc/java/jcf-write.c index a73b7be..d775a81 100644 --- a/gcc/java/jcf-write.c +++ b/gcc/java/jcf-write.c @@ -772,7 +772,8 @@ static int find_constant_wide (HOST_WIDE_INT lo, HOST_WIDE_INT hi, struct jcf_partial *state) { - HOST_WIDE_INT w1, w2; + unsigned HOST_WIDE_INT w1; + HOST_WIDE_INT w2; lshift_double (lo, hi, -32, 64, &w1, &w2, 1); return find_constant2 (&state->cpool, CONSTANT_Long, (jword)(w1 & 0xFFFFFFFF), (jword)(lo & 0xFFFFFFFF)); @@ -822,7 +823,8 @@ find_constant_index (tree value, struct jcf_partial *state) static void push_long_const (HOST_WIDE_INT lo, HOST_WIDE_INT hi, struct jcf_partial *state) { - HOST_WIDE_INT highpart, dummy; + unsigned HOST_WIDE_INT highpart; + HOST_WIDE_INT dummy; jint lowpart = WORD_TO_INT (lo); rshift_double (lo, hi, 32, 64, &highpart, &dummy, 1); @@ -833,7 +835,8 @@ push_long_const (HOST_WIDE_INT lo, HOST_WIDE_INT hi, struct jcf_partial *state) OP1(OPCODE_lconst_0 + lowpart); } else if ((highpart == 0 && lowpart > 0 && lowpart < 32768) - || (highpart == -1 && lowpart < 0 && lowpart >= -32768)) + || (highpart == (unsigned HOST_WIDE_INT)-1 + && lowpart < 0 && lowpart >= -32768)) { push_int_const (lowpart, state); RESERVE (1); @@ -2929,11 +2932,11 @@ generate_classfile (tree clas, struct jcf_partial *state) { struct chunk *cpool_chunk; const char *source_file, *s; - char *ptr; + unsigned char *ptr; int i; - char *fields_count_ptr; + unsigned char *fields_count_ptr; int fields_count = 0; - char *methods_count_ptr; + unsigned char *methods_count_ptr; int methods_count = 0; tree part; int total_supers @@ -3079,7 +3082,7 @@ generate_classfile (tree clas, struct jcf_partial *state) int code_attributes_count = 0; static tree Code_node = NULL_TREE; tree t; - char *attr_len_ptr; + unsigned char *attr_len_ptr; struct jcf_handler *handler; if (Code_node == NULL_TREE) Code_node = get_identifier ("Code"); |