summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-03-11 09:02:18 +0100
committerStephan Bergmann <sbergman@redhat.com>2021-03-11 13:31:20 +0100
commitd148113591c554a3c6d8223767159334c014ad0c (patch)
tree391b348883f45277337c08ec5792d577f5c19e3a /slideshow
parentfeb4067be5d8e40902190dc58a7a634a21102f34 (diff)
Work around MSVC 2019 16.9.0 warning C4103 compiler bug
With that compiler version (and --with-latest-c++), the build now started to fail for me with > [build CXX] slideshow/source/engine/opengl/Operation.cxx > C:\PROGRA~2\MIB055~1\2019\COMMUN~1\VC\Tools\MSVC\1428~1.299\Include\memory(14): error C2220: the following warning is treated as an error > C:\PROGRA~2\MIB055~1\2019\COMMUN~1\VC\Tools\MSVC\1428~1.299\Include\memory(14): warning C4103: alignment changed after including header, may be due to missing #pragma pack(pop) > C:\lo\core\slideshow\source\engine\opengl\Operation.hxx(34): warning C4103: alignment changed after including header, may be due to missing #pragma pack(pop) > C:/lo/core/slideshow/source/engine/opengl/Operation.cxx(36): warning C4103: alignment changed after including header, may be due to missing #pragma pack(pop) Mike had experienced the same (though without --with-latest-c++, but due to us now always using /permissive-) as explained in the post-merge comments starting at <https://gerrit.libreoffice.org/c/core/+/108961/4# message-cc2a1e2ebaeb96cbacd7d13d57ffc701f2ed4608> "Use MSVC's /permissive- to make it more standards conforming", linking to <https://developercommunity.visualstudio.com/t/ warning-c4103-in-visual-studio-166-update/1057589> "Warning C4103 in Visual Studio 16.6 Update". At least for my --with-latest-c++ aka /std:c++latest case, I have reduced the issue to a test.cc of > #include <cmath> > template<typename> void f(int[1]) {} > #include <exception> failing with > ********************************************************************** > ** Visual Studio 2019 Developer Command Prompt v16.9.0 > ** Copyright (c) 2021 Microsoft Corporation > ********************************************************************** > [vcvarsall.bat] Environment initialized for: 'x64' > > C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>cd \lo\core > > C:\test>cl /std:c++latest /c test.cc > Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29910 for x64 > Copyright (C) Microsoft Corporation. All rights reserved. > > /std:c++latest is provided as a preview of language features from the latest C++ > > working draft, and we're eager to hear about bugs and suggestions for improvemen > ts. > However, note that these features are provided as-is without support, and subjec > t > to changes or removal as the working draft evolves. See > https://go.microsoft.com/fwlink/?linkid=2045807 for details. > > test.cc > test.cc(3): warning C4103: alignment changed after including header, may be due > to missing #pragma pack(pop) which looks clearly like a compiler bug. As it happens, reordering the includes here makes the issue disappear at least for me. Change-Id: Ib3d0756b38da4f24e62cafa900b44c8ec8e842b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112317 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/opengl/Operation.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/slideshow/source/engine/opengl/Operation.cxx b/slideshow/source/engine/opengl/Operation.cxx
index e70f203edad7..ec83d6b74c32 100644
--- a/slideshow/source/engine/opengl/Operation.cxx
+++ b/slideshow/source/engine/opengl/Operation.cxx
@@ -28,13 +28,13 @@
#include <sal/config.h>
+#include "Operation.hxx"
+
#include <basegfx/numeric/ftools.hxx>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
-#include "Operation.hxx"
-
SRotate::SRotate(const glm::vec3& Axis, const glm::vec3& Origin,
double Angle, bool bInter, double T0, double T1):
Operation(bInter, T0, T1),