# HG changeset patch # User johnc # Date 1302887450 25200 # Node ID edd9b016deb6bf68f302adcc53aad29c59f95697 # Parent 4080db1b5d0a4448daf42c0e1b01f354d1829203 7036021: G1: build failure on win64 and linux with hs21 in jdk6 build environment Summary: Missing parentheses around a casted expression and some missing casts were causing build failures with the jdk6 build tools. Reviewed-by: kvn, brutisso diff -r 4080db1b5d0a -r edd9b016deb6 src/share/vm/gc_implementation/g1/concurrentG1Refine.hpp --- a/src/share/vm/gc_implementation/g1/concurrentG1Refine.hpp Thu Apr 14 13:49:29 2011 -0700 +++ b/src/share/vm/gc_implementation/g1/concurrentG1Refine.hpp Fri Apr 15 10:10:50 2011 -0700 @@ -172,7 +172,7 @@ // hash a given key (index of card_ptr) with the specified size static unsigned int hash(size_t key, size_t size) { - return (unsigned int) key % size; + return (unsigned int) (key % size); } // hash a given key (index of card_ptr) @@ -180,11 +180,11 @@ return hash(key, _n_card_counts); } - unsigned ptr_2_card_num(jbyte* card_ptr) { - return (unsigned) (card_ptr - _ct_bot); + unsigned int ptr_2_card_num(jbyte* card_ptr) { + return (unsigned int) (card_ptr - _ct_bot); } - jbyte* card_num_2_ptr(unsigned card_num) { + jbyte* card_num_2_ptr(unsigned int card_num) { return (jbyte*) (_ct_bot + card_num); } diff -r 4080db1b5d0a -r edd9b016deb6 src/share/vm/opto/library_call.cpp --- a/src/share/vm/opto/library_call.cpp Thu Apr 14 13:49:29 2011 -0700 +++ b/src/share/vm/opto/library_call.cpp Fri Apr 15 10:10:50 2011 -0700 @@ -2193,7 +2193,7 @@ // Use the pre-barrier to record the value in the referent field pre_barrier(false /* do_load */, __ ctrl(), - NULL /* obj */, NULL /* adr */, -1 /* alias_idx */, NULL /* val */, NULL /* val_type */, + NULL /* obj */, NULL /* adr */, max_juint /* alias_idx */, NULL /* val */, NULL /* val_type */, pre_val /* pre_val */, T_OBJECT); @@ -5419,7 +5419,7 @@ // Use the pre-barrier to record the value in the referent field pre_barrier(false /* do_load */, control(), - NULL /* obj */, NULL /* adr */, -1 /* alias_idx */, NULL /* val */, NULL /* val_type */, + NULL /* obj */, NULL /* adr */, max_juint /* alias_idx */, NULL /* val */, NULL /* val_type */, result /* pre_val */, T_OBJECT);