RFR: 8281213: Unsafe uses of long and size_t in MemReporterBase::diff_in_current_scale [v6]
Thomas Stuefe
stuefe at openjdk.org
Wed Jan 18 06:37:22 UTC 2023
On Wed, 18 Jan 2023 04:38:21 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> Would a 32-bit compiler not warn about a comparison that is always true?
>
> I don't think so. We don't consider such warnings helpful, because they just
> lead to this kind of conditionalization (or dropping such checks altogether).
> So far as I know, only clang among widely supported compilers warns about it,
> and we've specifically disabled that warning globally because we consider it
> non-helpful.
Okay, thanks for the clarification. I could have sworn I saw this warning on local x86 builds, but it may have been something like >=0 comparisons for unsigned.
-------------
PR: https://git.openjdk.org/jdk/pull/11514
More information about the hotspot-runtime-dev
mailing list