solenv/gbuild/platform/com_MSC_defs.mk | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit 33eb52e005eb67856137475ff761ce4df006bd57 Author: Stephan Bergmann <[email protected]> AuthorDate: Mon Jul 17 17:16:03 2023 +0200 Commit: Stephan Bergmann <[email protected]> CommitDate: Tue Jul 18 08:14:20 2023 +0200 MSVC: Silence C++23 std::numeric_limits::has_denorm deprecation warning ...as seen at least when building against VS 2022 Preview 17.7.0 Preview 3.0 and --with-latest-c++, > [build CXX] connectivity/source/commontools/RowFunctionParser.cxx > workdir\UnpackedTarball\boost\boost/spirit/home/classic/core/primitives/impl/numerics.ipp(199): error C2220: the following warning is treated as an error > workdir\UnpackedTarball\boost\boost/spirit/home/classic/core/primitives/impl/numerics.ipp(199): warning C4996: 'std::_Num_base::has_denorm': warning STL4042: std::float_denorm_style, std::numeric_limits::has_denorm, and std::numeric_limits::has_denorm_loss are deprecated in C++23. You can define _SILENCE_CXX23_DENORM_DEPRECATION_WARNING or _SILENCE_ALL_CXX23_DEPRECATION_WARNINGS to suppress this warning. > workdir\UnpackedTarball\boost\boost/spirit/home/classic/core/primitives/impl/numerics.ipp(193): note: while compiling class template member function 'bool boost::spirit::classic::impl::negative_accumulate<T,10>::add(T &,T)' > with > [ > T=int > ] [...] etc. Change-Id: If9f03e0c5e910549df1c5eb0e089b39623776311 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154552 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk index ad425e9b5fdd..407ca991007d 100644 --- a/solenv/gbuild/platform/com_MSC_defs.mk +++ b/solenv/gbuild/platform/com_MSC_defs.mk @@ -40,6 +40,11 @@ ifneq ($(origin CXX),default) gb_CXX := $(CXX) endif +# _SILENCE_CXX23_DENORM_DEPRECATION_WARNING is needed at least with Boost 1.82.0 using +# std::numeric_limits::has_denorm in +# workdir/UnpackedTarball/boost/boost/spirit/home/classic/core/primitives/impl/numerics.ipp, in turn +# included from boost/spirit/include/classic_core.hpp as included from various of our code files: + # _SCL_SECURE_NO_WARNINGS avoids deprecation warnings for STL algorithms # like std::copy, std::transform (when MSVC_USE_DEBUG_RUNTIME is enabled) @@ -50,6 +55,7 @@ gb_COMPILERDEFS := \ -D_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING \ -D_SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING \ -D_SILENCE_CXX17_RESULT_OF_DEPRECATION_WARNING \ + -D_SILENCE_CXX23_DENORM_DEPRECATION_WARNING \ -D_CRT_NON_CONFORMING_SWPRINTFS \ -D_CRT_NONSTDC_NO_DEPRECATE \ -D_CRT_SECURE_NO_DEPRECATE \
