Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile warnings in clang 18 #152

Open
tian-lt opened this issue Aug 9, 2024 · 2 comments
Open

Compile warnings in clang 18 #152

tian-lt opened this issue Aug 9, 2024 · 2 comments
Labels
bug Something isn't working build p2

Comments

@tian-lt
Copy link
Collaborator

tian-lt commented Aug 9, 2024

When the google test version bumps to the lates, we can see below warnings when we compile tests with clang 18

In file included from /home/runner/work/proxy/proxy/build-clang-18/_deps/googletest-src/googletest/src/gtest-all.cc:38:
In file included from /home/runner/work/proxy/proxy/build-clang-18/_deps/googletest-src/googletest/include/gtest/gtest.h:55:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/memory:66:
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_tempbuf.h:263:8: warning: 'get_temporary_buffer<testing::TestInfo *>' is deprecated [-Wdeprecated-declarations]
  263 |                 std::get_temporary_buffer<value_type>(_M_original_len));
      |                      ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_algo.h:4996:15: note: in instantiation of member function 'std::_Temporary_buffer<__gnu_cxx::__normal_iterator<testing::TestInfo **, std::vector<testing::TestInfo *>>, testing::TestInfo *>::_Temporary_buffer' requested here
 4996 |       _TmpBuf __buf(__first, (__last - __first + 1) / 2);
      |               ^
/usr/bin/../lib/gcc/x[86](https://github.com/microsoft/proxy/actions/runs/10312728530/job/28548416779#step:8:87)_64-linux-gnu/12/../../../../include/c++/12/bits/stl_algo.h:5070:23: note: in instantiation of function template specialization 'std::__stable_sort<__gnu_cxx::__normal_iterator<testing::TestInfo **, std::vector<testing::TestInfo *>>, __gnu_cxx::__ops::_Iter_comp_iter<(lambda at /home/runner/work/proxy/proxy/build-clang-18/_deps/googletest-src/googletest/src/gtest.cc:3009:20)>>' requested here
 5070 |       _GLIBCXX_STD_A::__stable_sort(__first, __last,
      |                       ^
/home/runner/work/proxy/proxy/build-clang-18/_deps/googletest-src/googletest/src/gtest.cc:3008:8: note: in instantiation of function template specialization 'std::stable_sort<__gnu_cxx::__normal_iterator<testing::TestInfo **, std::vector<testing::TestInfo *>>, (lambda at /home/runner/work/proxy/proxy/build-clang-18/_deps/googletest-src/googletest/src/gtest.cc:3009:20)>' requested here
 3008 |   std::stable_sort(test_info_list_.begin(), test_info_list_.end(),
      |        ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_tempbuf.h:99:5: note: 'get_temporary_buffer<testing::TestInfo *>' has been explicitly marked deprecated here
   99 |     _GLIBCXX17_DEPRECATED
      |     ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/x86_64-linux-gnu/c++/12/bits/c++config.h:119:34: note: expanded from macro '_GLIBCXX17_DEPRECATED'
  119 | # define _GLIBCXX17_DEPRECATED [[__deprecated__]]
      |                                  ^
@tian-lt
Copy link
Collaborator Author

tian-lt commented Aug 9, 2024

One hypothesis is that the root cause might because we are using libstdc++ with clang, while libc++ is the standard library for LLVM.

@mingxwa mingxwa added bug Something isn't working build p2 labels Aug 13, 2024
@frederick-vs-ja
Copy link
Contributor

I believe the warning is totally unrelated to proxy. We're not using any related standard utilities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build p2
Projects
None yet
Development

No branches or pull requests

3 participants