GCC suggest-override warnings

Open
#76 16 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
tooling

Research direction

Start by reproducing the GCC 7.5 build with -Werror=suggest-override, then inspect the functions reported in bad_weak_ptr.hpp, local_counted_base.hpp, and sp_counted_impl.hpp. Compare the reported methods with their base declarations and run the smart_ptr test suite. Done means the listed warnings no longer fail the build without breaking supported compiler compatibility.

Written by the indexing model from the issue text.

Description

GCC 7.5 fires suggest-override warnings in Boost 1.72:

include/boost/smart_ptr/bad_weak_ptr.hpp:50:26: error: ‘virtual const char* boost::bad_weak_ptr::what() const’ can be marked override [-Werror=suggest-override]
include/boost/smart_ptr/detail/local_counted_base.hpp:116:18: error: ‘virtual void boost::detail::local_counted_impl::local_cb_destroy()’ can be marked override [-Werror=suggest-override]
include/boost/smart_ptr/detail/local_counted_base.hpp:121:41: error: ‘virtual boost::detail::shared_count boost::detail::local_counted_impl::local_cb_get_shared_count() const’ can be marked override [-Werror=suggest-override]
include/boost/smart_ptr/detail/local_counted_base.hpp:133:18: error: ‘virtual void boost::detail::local_counted_impl_em::local_cb_destroy()’ can be marked override [-Werror=suggest-override]
include/boost/smart_ptr/detail/local_counted_base.hpp:138:41: error: ‘virtual boost::detail::shared_count boost::detail::local_counted_impl_em::local_cb_get_shared_count() const’ can be marked override [-Werror=suggest-override]
include/boost/smart_ptr/detail/sp_counted_impl.hpp:88:18: error: ‘void boost::detail::sp_counted_impl_p::dispose() [with X = boost::iostreams::symmetric_filter >, std::allocator >::impl]’ can be marked override [-Werror=suggest-override]
include/boost/smart_ptr/detail/sp_counted_impl.hpp:96:20: error: ‘void* boost::detail::sp_counted_impl_p::get_deleter(const sp_typeinfo_&) [with X = boost::iostreams::symmetric_filter >, std::allocator >::impl; boost::detail::sp_typeinfo_ = std::type_info]’ can be marked override [-Werror=suggest-override]
include/boost/smart_ptr/detail/sp_counted_impl.hpp:101:20: error: ‘void* boost::detail::sp_counted_impl_p::get_local_deleter(const sp_typeinfo_&) [with X = boost::iostreams::symmetric_filter >, std::allocator >::impl; boost::detail::sp_typeinfo_ = std::type_info]’ can be marked override [-Werror=suggest-override]
include/boost/smart_ptr/detail/sp_counted_impl.hpp:106:20: error: ‘void* boost::detail::sp_counted_impl_p::get_untyped_deleter() [with X = boost::iostreams::symmetric_filter >, std::allocator >::impl]’ can be marked override [-Werror=suggest-override]
Dominant language
C++
Stars
111
Forks
116
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/smart_ptr

All issues in boostorg/smart_ptr

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.