RFR: 8079093: Remove FakeRttiSupport workaround for gcc -Wtypes-limit

Volker Simonis volker.simonis at gmail.com
Wed Jun 3 13:34:59 UTC 2015

Hi Kim,

as far as I can see, TagType is a template parameter. What if this
parameter is of type unsigned?

Wouldn't we get a warning that the comparison '0 <= tag' is always
true? So why not cast the tag in the comparison as well '0 <=

You also changed 'tag < (sizeof(uintx) * BitsPerByte' to 'tag <
BitsPerWord' but I don't think that is safe because it is not
guaranteed that sizeof(TagType)==BitsPerWord. Currently
FakeRttiSupport is only instantiated with TagType=Name where Name is
an enum but that enum can very well be less than 32-bit wide as the
C++ standard only requires that en enum is beeing backed up by an
underlying integral type which is big enough to hold all the enum
values. So I'd suggest to better keep the old assertion.


On Thu, Apr 30, 2015 at 7:14 AM, Kim Barrett <kim.barrett at oracle.com> wrote:
> Please review this removal of a workaround to avoid spurious compiler
> warnings when building on MacOSX.
> With the move to a newer minimum compiler version for MacOSX, the
> workaround is no longer needed.
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8079093
> Webrev:
> http://cr.openjdk.java.net/~kbarrett/8079093/webrev/
> Testing:

More information about the hotspot-gc-dev mailing list