Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'npy_intp' (aka 'int') in initializer list (on 32-bit architectures) #416

Closed
yurivict opened this issue Aug 15, 2021 · 1 comment

Comments

@yurivict
Copy link

/wrkdirs/usr/ports/science/siconos/work/.build/wrap/siconos/kernelPYTHON_wrap.cxx:6487:37: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'npy_intp' (aka 'int') in initializer list [-Wc++11-narrowing]
    npy_intp this_vector_dim[1] = { v.size() };
                                    ^~~~~~~~
/wrkdirs/usr/ports/science/siconos/work/.build/wrap/siconos/kernelPYTHON_wrap.cxx:6487:37: note: insert an explicit cast to silence this issue
    npy_intp this_vector_dim[1] = { v.size() };
                                    ^~~~~~~~
                                    static_cast<npy_intp>( )
/wrkdirs/usr/ports/science/siconos/work/.build/wrap/siconos/kernelPYTHON_wrap.cxx:6497:37: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'npy_intp' (aka 'int') in initializer list [-Wc++11-narrowing]
    npy_intp this_vector_dim[1] = { v->size() };
                                    ^~~~~~~~~
/wrkdirs/usr/ports/science/siconos/work/.build/wrap/siconos/kernelPYTHON_wrap.cxx:6497:37: note: insert an explicit cast to silence this issue
    npy_intp this_vector_dim[1] = { v->size() };
                                    ^~~~~~~~~
                                    static_cast<npy_intp>( )

Log: http://beefy17.nyi.freebsd.org/data/main-i386-default/p02ce566ed255_s825fb07c55/logs/siconos-4.4.0.r3_2.log (IPv6 URL)
Version: 4.4.0.rc3
OS: FreeBSD 13 i386

@vacary
Copy link
Member

vacary commented Aug 23, 2021

I cannot reprodruce this issue. It seems that the problem comes from the code generated by swig. What is the version of swig that you use ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants