RFR: 8314488: Compiling the JDK with C++17
Kim Barrett
kbarrett at openjdk.org
Sat Aug 16 11:58:10 UTC 2025
On Sat, 16 Aug 2025 09:44:22 GMT, Andrew Haley <aph at openjdk.org> wrote:
>> I'm hijacking the PR mechanism as a way to discuss new C++17 features that can
>> be more easily structured and captured than bare email. Once discussion
>> settles down I'll turn the results into HotSpot Style Guide changes. I don't
>> intend to integrate any version of this document to the OpenJDK repository.
>
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25992#discussion_r2280393882
More information about the hotspot-dev
mailing list