Mercurial > hg > graal-jvmci-8
diff src/share/vm/oops/cpCache.hpp @ 23747:4da0ab22649c
8157758: JDK9 does not compile on Linux with GCC 6.1 because left-shifting a negative number has undefined behavior
Summary: Replace shifts of -1 with shifts of ~0u.
Reviewed-by: kbarrett, mockner
Contributed-by: alexhenrie24@gmail.com
author | kbarrett |
---|---|
date | Thu, 23 Jun 2016 16:46:41 -0400 |
parents | b5f3a471e646 |
children | 719853999215 |
line wrap: on
line diff
--- a/src/share/vm/oops/cpCache.hpp Fri Aug 26 13:37:53 2016 -0700 +++ b/src/share/vm/oops/cpCache.hpp Thu Jun 23 16:46:41 2016 -0400 @@ -192,7 +192,7 @@ field_index_mask = right_n_bits(field_index_bits), parameter_size_bits = 8, // subset of field_index_mask, range is 0..255 parameter_size_mask = right_n_bits(parameter_size_bits), - option_bits_mask = ~(((-1) << tos_state_shift) | (field_index_mask | parameter_size_mask)) + option_bits_mask = ~(((~0u) << tos_state_shift) | (field_index_mask | parameter_size_mask)) }; // specific bit definitions for the indices field: