RFR: 8314488: Compiling the JDK with C++17

Andrew Haley aph at openjdk.org
Sat Aug 16 15:26:18 UTC 2025


On Sat, 16 Aug 2025 11:55:24 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> doc/cpp17-features.md line 740:
>> 
>>> 738: ##### 35.1.2. Keyword `register`
>>> 739: 
>>> 740: We don't use the `register` keyword in the OpenJDK anymore?
>> 
>> It's essential in some uses of GCC extended asm. See `atomic_linux_aarch64.hpp` for a good example.
>
> `register` is not used as a storage class specifier in the JDK. That use for
> gcc extended asm is a gcc extension, with a different meaning and syntax. (It
> has some similarities in appearance, but is really pretty different.) C++17
> still retains `register` as a reserved word, so one still can't start using it
> for other purposes.

OK, as long as it's clear that `register asm` is allowed.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25992#discussion_r2280468716


More information about the hotspot-dev mailing list