RFR: 8300054: Use static_assert in basic_types_init

Stefan Karlsson stefank at openjdk.org
Thu Jan 12 16:42:20 UTC 2023


On Thu, 12 Jan 2023 16:17:49 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

> Simple change to use `static_assert` when applicable inside a function.

Looks good. One nit:

src/hotspot/share/utilities/globalDefinitions.cpp line 162:

> 160:   static_assert((size_t)HeapWordSize >= sizeof(juint),
> 161:          "HeapWord should be at least as large as juint");
> 162:   static_assert(sizeof(NULL) == sizeof(char*), "NULL must be same size as pointer");

Maybe fix alignment here.

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

Marked as reviewed by stefank (Reviewer).

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


More information about the hotspot-dev mailing list