Closed AndWass closed 2 years ago
The warning is triggered by the friend declarations in error_category
: https://github.com/boostorg/system/blob/e197c5e80373736cabc319b2d4fa0657e7821e87/include/boost/system/detail/error_category.hpp#L58-L59
This has already been reported as a bug to GCC twice: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68300, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102168.
Unfortunately, the first one of these has been closed as "wontfix". I added a comment to the second one referencing this issue.
I'm afraid there's nothing we can do on our side to avoid the warning at the moment. You can suppress it locally by using a pragma, as in https://godbolt.org/z/dnnfj419c.
Thanks for the explanation. I also went with the warning suppression for now.
It's a dumb warning, don't use it. The -Wdelete-non-virtual-dtor
is much more useful, and enabled by -Wall
.
When building with
-Wnon-virtual-dtor
with gcc, and creating a new error category this error pops up.Minimal example: https://godbolt.org/z/off6aea3Y