underflow in generated code
ghorn opened this issue · comments
Greg Horn commented
I tried clarabel code generation and I got this error:
error: unsigned conversion from 'int' to 'long unsigned int' changes value from '-1' to '18446744073709551615' [-Werror=sign-conversion]
5440 | cpg_csc acc_canon_A_map = {1802, 1802, 13, acc_canon_A_map_p, acc_canon_A_map_i, acc_canon_A_map_x, -1};
I'm compiling generated code myself, not using cvxpygen's built-in compilation, and have a lot of warning flags on. This one looked more suspicious than the others.
Greg Horn commented
Is nz
from struct cpg_csc
ever used? Can it be removed?
Maximilian Schaller commented
Thanks for pointing this out, closed by #33