On Thu, 26 Feb 2026 07:47:35 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 with a new target base due to a merge > or a rebase. The incremental webrev excludes the unrelated changes brought in > by the merge/rebase. The pull request contains three additional commits since > the last revision: > > - Merge branch 'openjdk:master' into jbs8378684 > - Disable deprecated-declarations only for gtest-all.cc > - 8378684: Fix -Wdeprecated-declarations warnings from gtest by clang23 > [...] But it turns out this is a known clang bug: > [llvm/llvm-project#76515](https://github.com/llvm/llvm-project/issues/76515) > I don't have a better idea of how to solve the specific problem than what you > are doing. But I would really like there to be some comment or followup issue > or something to give an indication of why it's being done and that it should > go away at some point. Specifically, a comment that disabling that warning is a workaround for the above mentioned clang bug. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29919#issuecomment-3975668073
