Use MSVC's /permissive- to make it more standards conforming

<https://docs.microsoft.com/en-us/cpp/build/reference/
permissive-standards-conformance?view=msvc-160> states:  "Starting in
Visual Studio 2019 version 16.8, the /std:c++latest option implicitly sets the
/permissive- option."  We opt-in to /std:c++latest via --with-latest-c++, which
I'm using for my local Windows builds, so I already happened to fix all the
/permissivie- issues across our code base when I upgraded to MSVC 16.8 (at first
being unaware why those issues started to show up for me, then understanding
that it was due to my use of --with-latest-c++ and this MSVC 16.8 change).

Change-Id: I29779ad7d3c2bb0f3615e16e377a8ea220d9e5f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108961
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann
2021-01-08 10:03:15 +01:00
parent 8e6237ff3a
commit b4b7e92cbf

View File

@@ -7032,7 +7032,7 @@ if test "$COM" = MSC -a "$COM_IS_CLANG" != TRUE; then
else
CXXFLAGS_CXX11=-std:c++17
fi
CXXFLAGS_CXX11="$CXXFLAGS_CXX11 -Zc:__cplusplus"
CXXFLAGS_CXX11="$CXXFLAGS_CXX11 -permissive- -Zc:__cplusplus"
elif test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
my_flags='-std=c++17 -std=c++1z'
if test "$with_latest_c__" = yes; then