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

compiler error in ivy1.8 : invalid conversion from ‘int’ to #60

Open
prpr2770 opened this issue Mar 25, 2022 · 0 comments
Open

compiler error in ivy1.8 : invalid conversion from ‘int’ to #60

prpr2770 opened this issue Mar 25, 2022 · 0 comments

Comments

@prpr2770
Copy link

prpr2770 commented Mar 25, 2022

The issue I've indicated below is similar to the one that was raised earlier in #57. It provides a more concise representation of the problem.

The ivy-script for modelling a connection-mgmt protocol check correctly, withivy_check OK.
However, when compiling it using ivyc target=test conn-mgmt.ivy, we obtain the following error:

$ ivyc target=test connection_mgmt_v2.ivy 
g++ -Wno-parentheses-equality  -std=c++11  -I /usr/local/lib/python2.7/dist-packages/ivy/include -L /usr/local/lib/python2.7/dist-packages/ivy/lib -Xlinker -rpath -Xlinker /usr/local/lib/python2.7/dist-packages/ivy/lib -g -o connection_mgmt_v2 connection_mgmt_v2.cpp -lz3 -pthread
connection_mgmt_v2.cpp: In member function ‘void connection_mgmt_v2::__init()’:
connection_mgmt_v2.cpp:1863:20: error: ‘__tup__namesOfProcedures__int’ was not declared in this scope
         hash_thunk<__tup__namesOfProcedures__int,bool> __tmp3;
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
connection_mgmt_v2.cpp:1863:20: note: suggested alternative: ‘__tup__int__namesOfProcedures’
         hash_thunk<__tup__namesOfProcedures__int,bool> __tmp3;
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                    __tup__int__namesOfProcedures
connection_mgmt_v2.cpp:1863:54: error: template argument 1 is invalid
         hash_thunk<__tup__namesOfProcedures__int,bool> __tmp3;
                                                      ^
connection_mgmt_v2.cpp:1863:54: error: template argument 3 is invalid
connection_mgmt_v2.cpp:1866:36: error: ‘__tup__namesOfProcedures__int’ is not a member of ‘connection_mgmt_v2’
         __tmp3[connection_mgmt_v2::__tup__namesOfProcedures__int(Y,X)] = false;
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
connection_mgmt_v2.cpp:1871:98: error: invalid conversion from ‘int’ to ‘connection_mgmt_v2::namesOfProcedures’ [-fpermissive]
         client__intf__connection_procedures[connection_mgmt_v2::__tup__int__namesOfProcedures(X,Y)] = __tmp3[connection_mgmt_v2::__tup__namesOfProcedures__int(Y,X)];
                                                                                                  ^
In file included from connection_mgmt_v2.cpp:1:0:
connection_mgmt_v2.h:714:34: note:   initializing argument 2 of ‘connection_mgmt_v2::__tup__int__namesOfProcedures::__tup__int__namesOfProcedures(const int&, const connection_mgmt_v2::namesOfProcedures&)’
 __tup__int__namesOfProcedures(){}__tup__int__namesOfProcedures(const int &arg0,const namesOfProcedures &arg1) : arg0(arg0),arg1(arg1){}
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
connection_mgmt_v2.cpp:1871:130: error: ‘__tup__namesOfProcedures__int’ is not a member of ‘connection_mgmt_v2’
     client__intf__connection_procedures[connection_mgmt_v2::__tup__int__namesOfProcedures(X,Y)] = __tmp3[connection_mgmt_v2::__tup__namesOfProcedures__int(Y,X)];
                                                                                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-parentheses-equality’
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

1 participant