From be35921b3fd60b0f64af9c8915013b8b4210f185 Mon Sep 17 00:00:00 2001 From: RonxBulld <526677628@qq.com> Date: Wed, 21 Apr 2021 14:37:58 +0800 Subject: [PATCH] GCC prior to 5.0 should ignore not only -Wnon-virtual-dtor but also -Weffc++, otherwise non-virtual destructor problems will still be reported. --- include/cxxopts.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/cxxopts.hpp b/include/cxxopts.hpp index eee7ba0..9e1a5f6 100644 --- a/include/cxxopts.hpp +++ b/include/cxxopts.hpp @@ -289,6 +289,7 @@ namespace cxxopts // GNU GCC with -Weffc++ will issue a warning regarding the upcoming class, we want to silence it: // warning: base class 'class std::enable_shared_from_this' has accessible non-virtual destructor #pragma GCC diagnostic ignored "-Wnon-virtual-dtor" +#pragma GCC diagnostic ignored "-Weffc++" #pragma GCC diagnostic push // This will be ignored under other compilers like LLVM clang. #endif