RFR: 8367536: Change RBTree to use C++17 features [v3]
Kim Barrett
kbarrett at openjdk.org
Wed Sep 17 21:33:01 UTC 2025
On Wed, 17 Sep 2025 08:45:45 GMT, Casper Norrbin <cnorrbin at openjdk.org> wrote:
> There seems to be a [bug](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71954) in older versions of gcc with partial template specialization of constexpr inside classes. This makes GHA fail on linux since it uses that older version, but works fine on newer versions or other platforms. I think the correct solutions is to make some changes to `HasNodeVerifier` to make GHA pass.
Well that's annoying. Good job tracking down the issue.
This looks like a relatively narrow bug, only affecting static data member
templates with specializations. That's not a case I'd used in experiments and
ongoing work that have used variable templates, so thankfully I don't need to
rewrite any of those.
Sorry I seem to have not explicitly tested for this case when I proposed
permitting variable templates. It's very hard to test new features thoroughly,
and I mostly rely on compilers doing their own testing.
We could add a note to the style guide about it, though I'm reluctant to
clutter that document with this kind of thing. The fix is in gcc14, so quite
recent, even though the bug has been around for quite a while. My inclination
is to just leave things be, as it's a pretty narrow issue that seems to me
unlikely to come up often. And someday it will be moot, because we'll be
requiring a more recent version of gcc. Of course, there's the contrary
argument that you hit this pretty much right out of the gate...
Maybe leave a comment with `has_not_verifier` about the issue, referring to that
gcc bug? Oh, and `has_node_verifier` is a type, so should normally be studly
capped. Add an "Impl" suffix to avoid collision with the constant, and also
make it more obvious other code shouldn't be referencing it directly.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27260#issuecomment-3304624393
More information about the hotspot-dev
mailing list