On Sun, 1 Mar 2026 13:03:05 GMT, SendaoYan <[email protected]> wrote: >> Hi all, >> >> clang23+gcc12(ubuntu) generate compiler warning >> "get_temporary_buffer<testing::TestInfo *>' is deprecated >> [-Werror,-Wdeprecated-declarations]". And this compiler warning from >> googletest file googletest/src/gtest.cc, googletest/src/gtest.cc invoke >> `std::stable_sort`, and `std::stable_sort` invoke deprecated >> `std::get_temporary_buffer`. So this warning is unrelated to JDK totally. >> >> This PR disable deprecated-declarations warning when building libgtest. >> Change has been verified locally. > > SendaoYan has updated the pull request incrementally with one additional > commit since the last revision: > > Use $() instead of # as comment line inside makefile macro
Marked as reviewed by erikj (Reviewer). make/hotspot/lib/CompileGtest.gmk line 68: > 66: $(comment Disable deprecated-declarations warnings to workaround) \ > 67: $(comment clang18+glibc12 bug > https://github.com/llvm/llvm-project/issues/76515) \ > 68: $(comment until the clang bug has been fixed) \ This is a creative way of adding comments inside macro calls in make that I haven't seen before. We have usually resorted to putting comments before the top level call. I think I'm ok with this construct, at least for now. ------------- PR Review: https://git.openjdk.org/jdk/pull/29919#pullrequestreview-3876426868 PR Review Comment: https://git.openjdk.org/jdk/pull/29919#discussion_r2872629035
