Integrated: 8275717: Reimplement STATIC_ASSERT to use static_assert
Stefan Karlsson
stefank at openjdk.java.net
Mon Oct 25 09:11:07 UTC 2021
On Fri, 22 Oct 2021 08:15:52 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
> We currently have a bespoke implementation of STATIC_ASSERT, which was added before we transitioned over to C++14. I recently saw some compiler warnings (macos-aarch64) about that implementation. I propose that we reimplement STATIC_ASSERT to use static_assert. FWIW, some HotSpot code already uses static_assert instead of STATIC_ASSERT.
>
> An alternative would be to completely remove STATIC_ASSERT and always use static_assert. That would require us to add a message string to all of the > 400 usages. Maybe we should wait with that until we can use C++17, which removes the requirement to provide a message?
This pull request has now been integrated.
Changeset: 0bcc1749
Author: Stefan Karlsson <stefank at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/0bcc1749eaea20cb983a983073ad33d305681879
Stats: 16 lines in 1 file changed: 0 ins; 15 del; 1 mod
8275717: Reimplement STATIC_ASSERT to use static_assert
Reviewed-by: stuefe, eosterlund, kbarrett
-------------
PR: https://git.openjdk.java.net/jdk/pull/6077
More information about the hotspot-dev
mailing list