# HG changeset patch # User kbarrett # Date 1430345100 14400 # Wed Apr 29 18:05:00 2015 -0400 # Node ID 65d63643a889e5fe95543f29c3d42efeabd6fafd # Parent ce8df07dd0740fb3e91303598399067db77fa71a [mq]: remove-workaround diff --git a/src/share/vm/utilities/fakeRttiSupport.hpp b/src/share/vm/utilities/fakeRttiSupport.hpp --- a/src/share/vm/utilities/fakeRttiSupport.hpp +++ b/src/share/vm/utilities/fakeRttiSupport.hpp @@ -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(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; } };