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

silence atomic_*<shared_ptr> warnings in recent libstdc++ #940

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

spoonincode
Copy link
Member

at least libstdc++ 14 complains about usage of these deprecated in c++20 (and removed in c++26) functions. Since this file is small enough, just silence deprecations in it for now until libc++ adds this in the future.

plugins/chain_plugin/get_info_db.cpp:144:15: warning: 'atomic_store<eosio::chain_apis::get_info_db::get_info_results>' is deprecated: use 'std::atomic<std::shared_ptr<T>>' instead [-Wdeprecated-declarations]
  144 |          std::atomic_store(&info_cache, info);  // replace current cache safely
      |               ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_atomic.h:181:5: note: 'atomic_store<eosio::chain_apis::get_info_db::get_info_results>' has been explicitly marked deprecated here
  181 |     _GLIBCXX20_DEPRECATED_SUGGEST("std::atomic<std::shared_ptr<T>>")
      |     ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/x86_64-pc-linux-gnu/bits/c++config.h:132:45: note: expanded from macro '_GLIBCXX20_DEPRECATED_SUGGEST'
  132 | # define _GLIBCXX20_DEPRECATED_SUGGEST(ALT) _GLIBCXX_DEPRECATED_SUGGEST(ALT)
      |                                             ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/x86_64-pc-linux-gnu/bits/c++config.h:100:19: note: expanded from macro '_GLIBCXX_DEPRECATED_SUGGEST'
  100 |   __attribute__ ((__deprecated__ ("use '" ALT "' instead")))

@spoonincode spoonincode merged commit 28c782e into main Oct 16, 2024
36 checks passed
@spoonincode spoonincode deleted the silence_atomic_sharedptr_warn branch October 16, 2024 16:01
@ericpassmore
Copy link
Contributor

Note:start
category: Chores
component: Internal
summary: Silence shared pointer warnings from libstdc++ .
Note:end

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

Successfully merging this pull request may close these issues.

4 participants