RFR: 8377895: Create sizeof_auto, to reduce narrowing conversions [v2]
Leo Korinth
lkorinth at openjdk.org
Tue Feb 17 14:54:32 UTC 2026
On Tue, 17 Feb 2026 13:05:53 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> Leo Korinth has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix test for platforms that can not handle unsigned max sizes
>
> src/hotspot/share/utilities/globalDefinitions.hpp line 171:
>
>> 169: #endif // _LP64
>> 170:
>> 171: // Use this instead of sizeof() if you want your expression not to be of type size_t
>
> Needs a better description, about what it actually does.
How about: returns the size (in bytes) of T in an unsigned type that is as small as possible.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29716#discussion_r2817454126
More information about the hotspot-dev
mailing list