Re:C, Fortran, and single-character strings
by eridius on Friday June 21, 2019 @04:48PM
(#20246207)
If the breakage is ultimately caused by compilers like GCC omitting the length for single-character strings, why doesn't this discuss the fix of simply changing GCC to start putting the length there for single-character strings?
[ Parent
| on HN ]
I've never used FORTRAN, so I'm just going off of my reading of the article. It looks to me like the correct requirement is that the C source code itself include the string length, and that developer have not been doing so.
Oh I see. I was thinking that calls to Fortran functions were actually recognizable by the compiler, but you're right, the code snippet right at the top shows a manually-inserted strlen(s) in the C code.