RFR: 8255082: HotSpot Style Guide should permit noexcept [v2]

Daniel D. Daugherty dcubed at openjdk.org
Mon Jun 2 19:41:54 UTC 2025


On Mon, 2 Jun 2025 08:21:34 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Please review this change to permit the use of `noexcept` under certain
>> circumstances in HotSpot code.
>> 
>> http://wg21.link/n3050
>> 
>> Testing:
>> 
>> JDK-8316930 (HotSpot should use noexcept instead of throw()) showed what the
>> conversion would look like. It will need to be brought up to current mainline,
>> possibly with modifications.
>> 
>> This is a modification of the Style Guide, so rough consensus among the
>> HotSpot Group members is required to make this change. Only Group members
>> should vote for approval (via the github PR), though reasoned objections or
>> comments from anyone will be considered. A decision on this proposal will not
>> be made before Friday 16-June-2025 at 12h00 UTC.
>> 
>> Since we're piggybacking on github PRs here, please use the PR review process
>> to approve (click on Review Changes > Approve), rather than sending a "vote:
>> yes" email reply that would be normal for a CFV.
>
> Kim Barrett has updated the pull request incrementally with one additional commit since the last revision:
> 
>   dholmes review

Thumbs up.

I do have a query about whether the mention of `nothrow` should be `noexcept`.

doc/hotspot-style.html line 1153:

> 1151: different guarantees for some operations (and may choose different
> 1152: algorithms to implement those operations), depending on whether certain
> 1153: functions (constructors, copy/move operations, swap) are nothrow or not.

`nothrow` here or `noexcept`?

doc/hotspot-style.md line 1145:

> 1143: guarantees for some operations (and may choose different algorithms to
> 1144: implement those operations), depending on whether certain functions
> 1145: (constructors, copy/move operations, swap) are nothrow or not. They detect

`nothrow` here or `noexcept`?

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

Marked as reviewed by dcubed (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/25574#pullrequestreview-2889700427
PR Review Comment: https://git.openjdk.org/jdk/pull/25574#discussion_r2122001750
PR Review Comment: https://git.openjdk.org/jdk/pull/25574#discussion_r2122004882


More information about the hotspot-dev mailing list