8211804: Constant AO_UNUSED_MBZ uses left shift of negative value
authorkbarrett
Mon, 08 Oct 2018 20:01:39 -0400
changeset 52048 71495d579a65
parent 52047 7bc8b456e5ac
child 52049 a986ec4ff214
child 56943 2d7c2706294a
8211804: Constant AO_UNUSED_MBZ uses left shift of negative value Summary: Use unsigned shift. Reviewed-by: alanb
src/jdk.pack/share/native/common-unpack/constants.h
--- a/src/jdk.pack/share/native/common-unpack/constants.h	Mon Oct 08 16:29:10 2018 -0700
+++ b/src/jdk.pack/share/native/common-unpack/constants.h	Mon Oct 08 20:01:39 2018 -0400
@@ -203,7 +203,7 @@
     AO_HAVE_FIELD_FLAGS_HI    = 1<<10,
     AO_HAVE_METHOD_FLAGS_HI   = 1<<11,
     AO_HAVE_CODE_FLAGS_HI     = 1<<12,
-    AO_UNUSED_MBZ             = (-1)<<13, // options bits reserved for future use.
+    AO_UNUSED_MBZ             = (int)((~0U)<<13), // options bits reserved for future use.
 
 #define ARCHIVE_BIT_DO(F) \
          F(AO_HAVE_SPECIAL_FORMATS) \