coq-plugin-template icon indicating copy to clipboard operation
coq-plugin-template copied to clipboard

Bitshift when calling C function

Open StamesJames opened this issue 1 year ago • 0 comments

I tried the template and noticed that the integer returned by the C function get_n is 1092 but the integer that is getting printed by the CallC Vernacular command is 546. For me it seams that at some point there happens a bitshift to the right because for the following other integers I get the following other prints: return 1093 prints 546 return 1094 prints 547 return 0 prints 0 return -1 prints 2147483647 return -2 prints 2147483647 return -3 prints 2147483646 because I can't find any reason for this in the code I thought I write an Issue for this.

StamesJames avatar Jul 05 '24 10:07 StamesJames