use strict; use warnings; use Inline C => <<'EOC'; /* As the function appears in AnyInt.pm */ long calc_32bit_signed_in_C(long input) { return (int32_t)((int32_t)input); } /* The same function, renamed to begin with an underscore, and return type altered to int */ int _calc_32bit_signed_in_C(int input) { return (int32_t)((int32_t)input); } EOC print calc_32bit_signed_in_C(1073741824 + 1073741824), "\n"; print _calc_32bit_signed_in_C(1073741824 + 1073741824), "\n"; __END__ Outputs: -2147483648 -2147483648