[eigen] "May be used uninitialized" warning...

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi all,

I was wondering if we could, before next beta3, find a solution to the
following warnings:

==========================================
In file included from /usr/local/include/eigen3/Eigen/Eigenvalues:30:0,
                 from /usr/local/include/eigen3/Eigen/QR:38,
                 from /usr/local/include/eigen3/Eigen/Dense:4,
                 from /home/jlblanco/code/aa/test.cpp:2:
/usr/local/include/eigen3/Eigen/src/Eigenvalues/RealSchur.h: In member
function ‘Eigen::RealSchur<MatrixType>&
Eigen::RealSchur<_MatrixType>::compute(const MatrixType&, bool) [with
_MatrixType = Eigen::Matrix<double, 4, 4>, MatrixType =
Eigen::Matrix<double, 4, 4>]’:
/usr/local/include/eigen3/Eigen/src/Eigenvalues/RealSchur.h:262:16:
warning: ‘firstHouseholderVector.Eigen::Matrix<double, 3,
1>::<anonymous>.Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 1>
>::m_storage.Eigen::DenseStorage<double, 3, 3, 1,
0>::m_data.Eigen::internal::matrix_array<double, 3, 0, 0>::array[0ul]’
may be used uninitialized in this function
/usr/local/include/eigen3/Eigen/src/Eigenvalues/RealSchur.h:262:16:
warning: ‘firstHouseholderVector.Eigen::Matrix<double, 3,
1>::<anonymous>.Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 1>
>::m_storage.Eigen::DenseStorage<double, 3, 3, 1,
0>::m_data.Eigen::internal::matrix_array<double, 3, 0, 0>::array[1ul]’
may be used uninitialized in this function
/usr/local/include/eigen3/Eigen/src/Eigenvalues/RealSchur.h:262:16:
warning: ‘firstHouseholderVector.Eigen::Matrix<double, 3,
1>::<anonymous>.Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 1>
>::m_storage.Eigen::DenseStorage<double, 3, 3, 1,
0>::m_data.Eigen::internal::matrix_array<double, 3, 0, 0>::array[2ul]’
may be used uninitialized in this function
==========================================

that one gets compiling something like:

int main()
{
	Eigen::Matrix<double,4,4>  M;
	Eigen::EigenSolver< Eigen::Matrix<double,4,4> > es(M, true);
	return 0;
}

with these GCC flags:  -Wall -O3  -DNDEBUG
Curiosly, without -DNDEBUG there are no warnings.

I'm almost sure it's not any real issue (the flow should assure those
vars are correctly initialized), but the warning still is very
annoying!

Any ideas?
Is is worth to initialize that array (e.g. to zeros) just to avoid this warning?


JL



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/