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

Intel Compiler warning messages

Tags: None
(comma "," separated)
gao
Registered Member
Posts
2
Karma
0
OS

Intel Compiler warning messages

Tue May 25, 2010 7:33 pm
Hi I am new to this library. Many thanks to the developing team, very nice! However, when I tried to compile code with intel c++ compiler I get a lot of warning messages. When I compile with g++, however, it gives no warnings. Although I could get rid of the warnings by doing "icpc -w Cpp.cpp" I still think it would be good to fix these warnings to make the Eigen program towards perfect. With this warnings I feel somewhat unsafe and bothering.

My code and warnings are as follows (using stable V2.0, it gives too many warnings in benchmark version to post here):

Code: Select all
////////////////////////////////
//: CPP.cpp
#include <iostream>
#include "Eigen/Eigen"
using namespace std;
USING_PART_OF_NAMESPACE_EIGEN

int main(){
  cout << MatrixXf::Constant(2, 3, sqrt(2)) << endl;
  RowVector3i v;
  v.setConstant(6);
  cout << "v = " << v << endl;
  return 0;

} ///:~

///////////////////////////////

~$ icpc CPP.cpp

Eigen/src/Core/SolveTriangular.h(36): warning #68: integer conversion
resulted in a change of sign
                       : -1,
                         ^

Eigen/src/Core/SolveTriangular.h(37): warning #68: integer conversion
resulted in a change of sign
    int StorageOrder = ei_is_part<Lhs>::value ? -1  // this is to
solve ambiguous specializations
                                                ^

Eigen/src/Core/MatrixBase.h(491): warning #21: type qualifiers are
meaningless in this declaration
      EIGEN_STRONG_INLINE const typename ei_eval<Derived>::type eval()
const
                          ^
          detected during:
            instantiation of class "Eigen::MatrixBase<Derived> [with
Derived=Eigen::Matrix<int, 10000, 1, 2, 10000, 1>]" at line 128 of
"Eigen/src/Core/Matrix.h"
            instantiation of class "Eigen::Matrix<_Scalar, _Rows,
_Cols, _Options, _MaxRows, _MaxCols> [with _Scalar=int, _Rows=10000,
_Cols=1, _Options=2, _MaxRows=10000, _MaxCols=1]" at line 168 of
"Eigen/src/Sparse/SparseLDLT.h"

Eigen/src/Core/MatrixBase.h(491): warning #21: type qualifiers are
meaningless in this declaration
      EIGEN_STRONG_INLINE const typename ei_eval<Derived>::type eval()
const
                          ^
          detected during:
            instantiation of class "Eigen::MatrixBase<Derived> [with
Derived=Eigen::Matrix<float, 10000, 10000, 2, 10000, 10000>]" at line
128 of "Eigen/src/Core/Matrix.h"
            instantiation of class "Eigen::Matrix<_Scalar, _Rows,
_Cols, _Options, _MaxRows, _MaxCols> [with _Scalar=float, _Rows=10000,
_Cols=10000, _Options=2, _MaxRows=10000, _MaxCols=10000]" at line 9 of
"CPP.cpp"

Eigen/src/Core/MatrixBase.h(491): warning #21: type qualifiers are
meaningless in this declaration
      EIGEN_STRONG_INLINE const typename ei_eval<Derived>::type eval()
const
                          ^
          detected during:
            instantiation of class "Eigen::MatrixBase<Derived> [with
Derived=Eigen::Matrix<int, 1, 3, 2, 1, 3>]" at line 128 of "Eigen/src/
Core/Matrix.h"
            instantiation of class "Eigen::Matrix<_Scalar, _Rows,
_Cols, _Options, _MaxRows, _MaxCols> [with _Scalar=int, _Rows=1,
_Cols=3, _Options=2, _MaxRows=1, _MaxCols=3]" at line 10 of "CPP.cpp"

Eigen/src/Core/IO.h(127): warning #21: type qualifiers are meaningless
in this declaration
    const typename Derived::Nested m = _m;
    ^
          detected during:
            instantiation of "std::ostream
&Eigen::ei_print_matrix(std::ostream &, const Derived &, const
Eigen::IOFormat &) [with Derived=Eigen::Matrix<float, 10000, 10000, 2,
10000, 10000>]" at line 181
            instantiation of "std::ostream
&Eigen::operator<<(std::ostream &, const Eigen::MatrixBase<Derived> &)
[with
Derived=Eigen::CwiseNullaryOp<Eigen::ei_scalar_constant_op<float>,
Eigen::Matrix<float, 10000, 10000, 2, 10000, 10000>>]" at line 9 of
"CPP.cpp"

Eigen/src/Core/IO.h(127): warning #21: type qualifiers are meaningless
in this declaration
    const typename Derived::Nested m = _m;
    ^
          detected during:
            instantiation of "std::ostream
&Eigen::ei_print_matrix(std::ostream &, const Derived &, const
Eigen::IOFormat &) [with Derived=Eigen::Matrix<int, 1, 3, 2, 1, 3>]"
at line 181
            instantiation of "std::ostream
&Eigen::operator<<(std::ostream &, const Eigen::MatrixBase<Derived> &)
[with Derived=Eigen::Matrix<int, 1, 3, 2, 1, 3>]" at line 12 of
"CPP.cpp"
~$
User avatar
bjacob
Registered Member
Posts
658
Karma
3

Re: Intel Compiler warning messages

Thu May 27, 2010 12:02 am
These look like pretty good warnings, thanks.
However we're quite busy atm... could you file a bug report (so we can't forget)?


Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list!
gao
Registered Member
Posts
2
Karma
0
OS

Re: Intel Compiler warning messages

Thu May 27, 2010 5:54 pm
Thanks Benoit! I've submitted a bug report for V2.9 which gives a longer text of warnings. It seems most of them has to do with the "const" -- I wish it is not complicated to fix.

Best wishes
Gao


Bookmarks



Who is online

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