diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-02-17 08:21:50 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-02-17 14:17:12 +0100 |
commit | 0e90358490fd90a2b45917dd4b076e97082e8fdf (patch) | |
tree | 0c931b2a9c01a2ef05b4c5497f6d2fcdabc1d35b /solenv | |
parent | 6f8cfcfe04b3ccddb86f228dd95622eb24a05def (diff) |
More targeted suppression of bogus GCC -Werror=stringop-overflow=
...given that <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87296#c5>
"[8/9/10/11 Regression] -Wstringop-overflow false positive due to using MEM_REF
type of &MEM" is declared fixed now on GCC 11 trunk.
(Moving -Wno-stringop-overflow from gb_CFLAGS_WERROR to gb_CXXFLAGS_COMMON is
done for no other reason than to harmonize this with the code for the similar
HAVE_BROKEN_GCC_WMAYBE_UNINITIALIZED.)
Change-Id: I3468138c9bbda28f754d4162cb9c059796bd3932
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111029
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/platform/com_GCC_defs.mk | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index 047f121106de..d8784dfb6a6e 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -93,6 +93,10 @@ ifeq ($(HAVE_BROKEN_GCC_WMAYBE_UNINITIALIZED),TRUE) gb_CXXFLAGS_COMMON += -Wno-maybe-uninitialized endif +ifeq ($(HAVE_BROKEN_GCC_WSTRINGOP_OVERFLOW),TRUE) +gb_CXXFLAGS_COMMON += -Wno-stringop-overflow +endif + gb_CXXFLAGS_Wundef = -Wno-undef ifeq ($(strip $(gb_GCOV)),YES) @@ -158,9 +162,6 @@ endif endif gb_CFLAGS_WERROR = $(if $(ENABLE_WERROR),-Werror) -ifeq ($(ENABLE_OPTIMIZED)-$(COM_IS_CLANG),TRUE-) -gb_CFLAGS_WERROR += -Wno-stringop-overflow -endif # This is the default in non-C++11 mode ifeq ($(COM_IS_CLANG),TRUE) |