diff --git a/Eigen/src/Core/Product.h b/Eigen/src/Core/Product.h index 6e54f2eca..7e68a5724 100644 --- a/Eigen/src/Core/Product.h +++ b/Eigen/src/Core/Product.h @@ -381,11 +381,11 @@ template<> struct ei_gemv_selector Scalar* EIGEN_RESTRICT rhs_data; if (DirectlyUseRhs) - rhs_data = &actualRhs.const_cast_derived().coeffRef(0); + rhs_data = reinterpret_cast(&actualRhs.const_cast_derived().coeffRef(0)); else { rhs_data = ei_aligned_stack_new(Scalar, actualRhs.size()); - Map(rhs_data, actualRhs.size()) = actualRhs; + Map(reinterpret_cast(rhs_data), actualRhs.size()) = actualRhs; } ei_cache_friendly_product_rowmajor_times_vector