8079093: Remove FakeRttiSupport workaround for gcc -Wtype-limits
authorkbarrett
Wed, 03 Jun 2015 14:38:54 -0400
changeset 31033 5b6d0c94767a
parent 31032 8e72621ca186
child 31034 6d34754bd5e0
child 31235 b302e98fef45
8079093: Remove FakeRttiSupport workaround for gcc -Wtype-limits Summary: Remove the no longer needed workaround. Reviewed-by: jmasa, david, simonis
hotspot/src/share/vm/utilities/fakeRttiSupport.hpp
--- a/hotspot/src/share/vm/utilities/fakeRttiSupport.hpp	Wed Jun 03 08:49:34 2015 +0900
+++ b/hotspot/src/share/vm/utilities/fakeRttiSupport.hpp	Wed Jun 03 14:38:54 2015 -0400
@@ -89,11 +89,11 @@
     return ((uintx)1) << validate_tag(tag);
   }
 
-  static TagType validate_tag(uintx tag) {
-    // Type of tag is not TagType to dodge useless MacOSX compiler warning.
-    assert(tag < (sizeof(uintx) * BitsPerByte),
-           err_msg("Tag " UINTX_FORMAT " is too large", tag));
-    return static_cast<TagType>(tag);
+  static TagType validate_tag(TagType tag) {
+    assert(0 <= tag, err_msg("Tag " INTX_FORMAT " is negative", (intx)tag));
+    assert(tag < BitsPerWord,
+           err_msg("Tag " UINTX_FORMAT " is too large", (uintx)tag));
+    return tag;
   }
 };