Re: [eigen] Fix for invalid integer constant

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


sounds good to me, patch applied. thanks.


gael

On Fri, Jan 6, 2012 at 8:23 AM, Keir Mierle <mierle@xxxxxxxxx> wrote:
> The attached patch fixes the following compile error, which happens when
> compiling Eigen with some C++11 warnings turned on in Clang.
>
> ./third_party/eigen3/Eigen/src/LU/arch/Inverse_SSE.h:58:60: error: constant
> expression evaluates to 2147483648 which cannot be narrowed to type 'int' in
> C++11 [-Werror,-Wc++11-narrowing]
>     EIGEN_ALIGN16 const  int _Sign_PNNP[4] = { 0x00000000, 0x80000000,
> 0x80000000, 0x00000000 };
>                                                            ^~~~~~~~~~
> ./third_party/eigen3/Eigen/src/LU/arch/Inverse_SSE.h:58:60: note: override
> this message by inserting an explicit cast
>     EIGEN_ALIGN16 const  int _Sign_PNNP[4] = { 0x00000000, 0x80000000,
> 0x80000000, 0x00000000 };
>                                                            ^~~~~~~~~~
>                                                            static_cas)<int>(
> ./third_party/eigen3/Eigen/src/LU/arch/Inverse_SSE.h:58:72: error: constant
> expression evaluates to 2147483648 which cannot be narrowed to type 'int' in
> C++11 [-Werror,-Wc++11-narrowing]
>     EIGEN_ALIGN16 const  int _Sign_PNNP[4] = { 0x00000000, 0x80000000,
> 0x80000000, 0x00000000 };
>
>  ^~~~~~~~~~
> ./third_party/eigen3/Eigen/src/LU/arch/Inverse_SSE.h:58:72: note: override
> this message by inserting an explicit cast
>     EIGEN_ALIGN16 const  int _Sign_PNNP[4] = { 0x00000000, 0x80000000,
> 0x80000000, 0x00000000 };
>
>  ^~~~~~~~~~
>
>  static_cas)<int>(
> ./third_party/eigen3/Eigen/src/LU/arch/Inverse_SSE.h:58:60: error: constant
> expression evaluates to 2147483648 which cannot be narrowed to type 'int' in
> C++11 [-Werror,-Wc++11-narrowing]
>     EIGEN_ALIGN16 const  int _Sign_PNNP[4] = { 0x00000000, 0x80000000,
> 0x80000000, 0x00000000 };
>                                                            ^~~~~~~~~~
> ./third_party/eigen3/Eigen/src/LU/arch/Inverse_SSE.h:58:60: note: override
> this message by inserting an explicit cast
>     EIGEN_ALIGN16 const  int _Sign_PNNP[4] = { 0x00000000, 0x80000000,
> 0x80000000, 0x00000000 };
>                                                            ^~~~~~~~~~
>                                                            static_cas)<int>(
> ./third_party/eigen3/Eigen/src/LU/arch/Inverse_SSE.h:58:72: error: constant
> expression evaluates to 2147483648 which cannot be narrowed to type 'int' in
> C++11 [-Werror,-Wc++11-narrowing]
>     EIGEN_ALIGN16 const  int _Sign_PNNP[4] = { 0x00000000, 0x80000000,
> 0x80000000, 0x00000000 };
>
>  ^~~~~~~~~~
> ./third_party/eigen3/Eigen/src/LU/arch/Inverse_SSE.h:58:72: note: override
> this message by inserting an explicit cast
>     EIGEN_ALIGN16 const  int _Sign_PNNP[4] = { 0x00000000, 0x80000000,
> 0x80000000, 0x00000000 };
>
>  ^~~~~~~~~~
>
>  static_cas)<int>(
>
> Let me know if more details are needed.
>
> Keir



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