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

Deprecation warning in GCC 14.2.0: std::atomic_load and std::atomic_store #1310

Open
CoinFuMasterShifu opened this issue Dec 24, 2024 · 5 comments

Comments

@CoinFuMasterShifu
Copy link

I get lots of deprecation warnings in GCC 14.2.0

warning: 'std::shared_ptr<_Tp> std::atomic_load(const shared_ptr<_Tp>*) [with _Tp = rtc::impl::IceTransport]' is deprecated: use 'std::atomic<std::shared_ptr<T>>' instead [-Wdeprecated-declarations]
warning: 'void std::atomic_store(shared_ptr<_Tp>*, shared_ptr<_Tp>) [with _Tp = rtc::impl::DtlsTransport]' is deprecated: use 'std::atomic<std::shared_ptr<T>>' instead [-Wdeprecated-declarations]

Can the code be updated somehow?

@paullouisageneau
Copy link
Owner

I don't get those warnings with GCC 14.2.1. It looks like you build the library with C++20 while it uses C++17 (C++17 should be the default mode for GCC 14).

@CoinFuMasterShifu
Copy link
Author

Yes true, happens with --std=c++20, C++20.

@CoinFuMasterShifu
Copy link
Author

I see you explicitly state "in C++17" so strictly speaking this issue is not present in your targeted C++ standard. Still may I reformulate it as "Do you plan to update to C++20? If so, maybe this warning needs to be addressed".

@paullouisageneau
Copy link
Owner

I'll update to C++20 at some point, however I want to keep retro-compatibility for a while. Until recently, people had to maintain a C++14 fork because some toolchains are stuck with old versions.

@CoinFuMasterShifu
Copy link
Author

Sounds good but maybe it could be achieved to keep focus on C++17 support and use some #ifdefs to remove the warnings for C++20.
Thank you for the answer. I think you can close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants