This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Visual C++ 2010 Compiler Warnings warning C4308: negative in

Tags: None
(comma "," separated)
sv507
Registered Member
Posts
1
Karma
0
Hi I'm an eigen NOOB.

I am just trying to get a clean compile of the eigen sample program
http://eigen.tuxfamily.org/dox//GettingStarted.html

and get the following errors C4307/4308 on eigen 3.04 using visual c++ 2010 (windows 7).
compiling in debug/release mode and have not set any macros myself

it seems related to http://listengine.tuxfamily.org/lists.tuxfamily.org/eigen/2011/11/msg00065.html

It compiles cleanly under intel compiler


So is this usual or am i doing something wrong?


ClCompile:
1> testeigen.cpp
1>c:\eigen-eigen-3.0.4\eigen\src\core\util\xprhelper.h(130): warning C4308: negative integral constant converted to unsigned type
1> c:\eigen-eigen-3.0.4\eigen\src\core\matrix.h(130) : see reference to class template instantiation 'Eigen::internal::compute_matrix_flags<Scalar,Rows,Cols,Options,MaxRows,MaxCols>' being compiled
1> with
1> [
1> Scalar=double,
1> Rows=-1,
1> Cols=1,
1> Options=0,
1> MaxRows=-1,
1> MaxCols=1
1> ]
1> c:\eigen-eigen-3.0.4\eigen\src\core\plainobjectbase.h(65) : see reference to class template instantiation 'Eigen::internal::traits<T>' being compiled
1> with
1> [
1> T=Eigen::Matrix<double,-1,1>
1> ]
1> c:\eigen-eigen-3.0.4\eigen\src\core\matrix.h(142) : see reference to class template instantiation 'Eigen::PlainObjectBase<Derived>' being compiled
1> with
1> [
1> Derived=Eigen::Matrix<double,-1,1>
1> ]
1> c:\users\sv507\documents\sean\work\phd\vixwatanabe\testeigen.cpp(14) : see reference to class template instantiation 'Eigen::Matrix<_Scalar,_Rows,_Cols>' being compiled
1> with
1> [
1> _Scalar=double,
1> _Rows=-1,
1> _Cols=1
1> ]
1>c:\eigen-eigen-3.0.4\eigen\src\core\util\xprhelper.h(130): warning C4307: '*' : integral constant overflow
1>
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
This warning has already been fixed. Will be part of 3.0.5
jiawen
Registered Member
Posts
4
Karma
0
I'm still getting the same warning on 3.1.0-alpha1. Using Visual Studio 2010, in both Win32 and x64.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]