From VHDL-2019 VHDL integer types are 64-bit rather than 32-bit and the C side foreign procedures use 32-bit integer types for compatibility for simulators running at earlier VHDL versions, including NVC older versions. This creates incorrect values across the C/VHDL boundary when in NVC and compiling for VHDL-2019.