RFR: 8300981: Build failure on 32-bit platforms after JDK-8281213

Coleen Phillimore coleenp at openjdk.org
Tue Jan 24 19:21:06 UTC 2023


On Tue, 24 Jan 2023 11:03:15 GMT, Jie Fu <jiefu at openjdk.org> wrote:

> Hi all,
> 
> Build failure was observed on x86_32 with `-Werror=type-limits` after JDK-8281213.
> 
> Since the asserts (L79 & L80) are always true on 32-bit platforms, it might be better to only enable them on 64-bit platforms.
> 
>  76   int64_t diff_in_current_scale(size_t s1, size_t s2) const {
>  77     assert(_scale != 0, "wrong scale");
>  78
>  79     assert(s1 < INT64_MAX, "exceeded possible memory limits");
>  80     assert(s2 < INT64_MAX, "exceeded possible memory limits");
>  81
>  82     bool is_negative = false;
>  83     if (s1 < s2) {
>  84       is_negative = true;
>  85       swap(s1, s2);
>  86     }
> 
> 
> Thanks.
> Best regards,
> Jie

Looks good and trivial.

-------------

Marked as reviewed by coleenp (Reviewer).

PR: https://git.openjdk.org/jdk/pull/12165


More information about the hotspot-runtime-dev mailing list