diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-02-22 14:05:24 +0600 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-02-23 11:23:12 +0100 |
commit | b889b33d928e49ba568ee1277c70d653083a2453 (patch) | |
tree | 5c2ae01894b5117abb7dcde49e70d2649f2380c2 /solenv | |
parent | 9ba68c769d41d1075152a22bf37e78fb9320317b (diff) |
Do not suppress newer compiler warnings on Windows
This partially reverts commit 133610669b8707a278d9b3b0af025779044fd8c5
(windows: silence new warning for now, 2016-02-21). That commit had
disabled warnings introduced after VS 2013 (compiler major version 18).
For now, it was impossible to remove the -Wv:18 from CLR flags. Also,
some warnings in Boost were suppressed in vcl/source/window/layout.cxx:
C:\lo\build\workdir\UnpackedTarball\boost\boost/multi_array/multi_array_ref.hpp(615): error C2220: the following warning is treated as an error
C:\lo\build\workdir\UnpackedTarball\boost\boost/multi_array/multi_array_ref.hpp(615): warning C4459: declaration of 'extents' hides global declaration
C:\lo\build\workdir\UnpackedTarball\boost\boost/multi_array/base.hpp(69): note: see declaration of 'boost::`anonymous-namespace'::extents'
C:\lo\build\workdir\UnpackedTarball\boost\boost/multi_array/multi_array_ref.hpp(612): note: while compiling class template member function 'boost::multi_array_ref<T,2>::multi_array_ref(T *,const boost::general_storage_order<2> &,const __int64 *,const unsigned __int64 *)'
with
[
T=`anonymous-namespace'::GridEntry
]
C:\lo\build\workdir\UnpackedTarball\boost\boost/multi_array.hpp(153): note: see reference to function template instantiation 'boost::multi_array_ref<T,2>::multi_array_ref(T *,const boost::general_storage_order<2> &,const __int64 *,const unsigned __int64 *)' being compiled
with
[
T=`anonymous-namespace'::GridEntry
]
C:\lo\build\workdir\UnpackedTarball\boost\boost/multi_array.hpp(122): note: see reference to class template instantiation 'boost::multi_array_ref<T,2>' being compiled
with
[
T=`anonymous-namespace'::GridEntry
]
C:/lo/core/vcl/source/window/layout.cxx(905): note: see reference to class template instantiation 'boost::multi_array<`anonymous-namespace'::GridEntry,2,std::allocator<T>>' being compiled
with
[
T=`anonymous-namespace'::GridEntry
]
Change-Id: Ibf89e3d3e5a2f6a747bb7fbd214a9b27d8068901
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163717
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/platform/com_MSC_defs.mk | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk index 3bf1a9d0a041..65918fc3da9b 100644 --- a/solenv/gbuild/platform/com_MSC_defs.mk +++ b/solenv/gbuild/platform/com_MSC_defs.mk @@ -122,14 +122,6 @@ gb_CFLAGS := \ gb_CXXFLAGS_DISABLE_WARNINGS = -w -ifneq ($(COM_IS_CLANG),TRUE) - -# clang-cl doesn't support -Wv:18 for now -gb_CFLAGS += \ - -Wv:18 \ - -endif - gb_CXXFLAGS := \ -utf-8 \ $(CXXFLAGS_CXX11) \ @@ -179,12 +171,10 @@ endif ifneq ($(COM_IS_CLANG),TRUE) -# clang-cl doesn't support -Wv:18 for now # Work around MSVC 2017 C4702 compiler bug with release builds # http://document-foundation-mail-archive.969070.n3.nabble.com/Windows-32-bit-build-failure-unreachable-code-tp4243848.html # http://document-foundation-mail-archive.969070.n3.nabble.com/64-bit-Windows-build-failure-after-MSVC-Update-tp4246816.html gb_CXXFLAGS += \ - -Wv:18 \ $(if $(filter 0,$(gb_DEBUGLEVEL)),-wd4702) \ endif @@ -267,8 +257,10 @@ endif gb_LTOFLAGS := $(if $(filter TRUE,$(ENABLE_LTO)),-GL) -# When compiling for CLR, disable "warning C4339: use of undefined type detected -# in CLR meta-data - use of this type may lead to a runtime exception": +# VS2019 produces a warning C4857, that it doesn't support -std:c++20; it can't +# be suppressed by -wd4857, only by -Wv:18. The warning seems incorrect, because +# using -std:c++17 produces errors about undeclated 'char8_t'. VS2022 doesn't +# have the problem, so drop -Wv:18 when bumping baseline. gb_CXXCLRFLAGS := \ $(if $(COM_IS_CLANG), \ $(patsubst -std=%,-std:c++20 -Zc:__cplusplus,$(gb_CXXFLAGS)), \ @@ -277,9 +269,7 @@ gb_CXXCLRFLAGS := \ -AI $(INSTDIR)/$(LIBO_URE_LIB_FOLDER) \ -EHa \ -clr \ - -wd4339 \ -Wv:18 \ - -wd4267 \ -Zc:twoPhase- \ ifeq ($(COM_IS_CLANG),TRUE) |