4 ms·
I work on a large, multi-platform, legacy codebase of C/C++ and Fortran, and the FFI between the two sides has always been an area where care must be taken to e
by ryl00 7y ago
I work on a large, multi-platform, legacy codebase of C/C++ and Fortran, and the FFI between the two sides has always been an area where care must be taken to ensure proper interop.
Being multi-platform, multi-compiler through the years has helped us ferret out FFI problems like the one described here, as our Windows Fortran compiler used to be Compaq Visual Fortran, which interleaved character strings with their length argument (as opposed to gfortran, which puts all such string lengths at the very end of the argument list). With Compaq Visual Fortran (and Intel Fortran with the right options set), forgetting to specify a string length argument on the C side would almost invariably lead to immediate crashes (unless, of course, the sole string argument was at the end).
- ChickeNES 7y agoCompaq had their own Fortran compiler?
- EvanAnderson 7y agoIt was DEC's and came to Compaq by way of the acquisition.