path: root/solenv/gbuild
diff options
authorStephan Bergmann <>2019-12-12 17:13:49 +0100
committerStephan Bergmann <>2019-12-12 22:00:31 +0100
commite4fac1ebbdc73e72fb79ab5d6743e0cc49b558d1 (patch)
treeba3b9398026754ef72d4d00ee4bddea0221c629c /solenv/gbuild
parentdac33e465a19f0cdd8b8450ca1631cb3e09d771f (diff)
Enable -Wdeprecated-copy-dtor where available
We already get -Wdeprecated-copy (warning about implicitly defined copy functions that will in the future be deleted because other user-provided copy functions exist) automatically through -Wextra, where available. -Wdeprecated-copy-dtor (warning about implicitly defined copy functions that will in the future be deleted because of a user-provided dtor) is split off into its own warning excluded from -Wextra for somewhat unclear reasons, see the discussion at <> "-Wdeprecated-copy is draconian and shouldn't be in -Wall". But -Wdeprecated-copy-dtor has been useful in finding issues (esp. the Clang 10 trunk version, which, unlike the GCC 9 version, also finds copy functions that are implicitly defined because they are used from template instantiations), see 3e59716375a240576fd6d8759b32b4319506ed70 "Prevent BroadcastRecalcOnRefMoveHandler copies" and 4f98cd0f9ce9c2a331a5d34b3ef9d18f9bb6b235 "ScShapeChild has broken copy functions". We need to disable -Wdeprecated-copy-dtor in files included from external/boost, and in two compilerplugin/clang/test/ files. Change-Id: I74b159c3a046e23661473ddbfe53c92c4136a9db Reviewed-on: Tested-by: Jenkins Reviewed-by: Stephan Bergmann <>
Diffstat (limited to 'solenv/gbuild')
1 files changed, 4 insertions, 0 deletions
diff --git a/solenv/gbuild/platform/ b/solenv/gbuild/platform/
index 13c770baa79f..5cc24413bb45 100644
--- a/solenv/gbuild/platform/
+++ b/solenv/gbuild/platform/
@@ -85,6 +85,10 @@ gb_CXXFLAGS_COMMON := \
-fstack-protector-strong \
$(if $(gb_COLOR),-fdiagnostics-color=always) \
+gb_CXXFLAGS_COMMON += -Wdeprecated-copy-dtor