Interoperability and compiler compatibility
FX
fxcoudert@gmail.com
Wed Oct 15 06:44:00 GMT 2014
> There are approximate 240 such functions in the code base, called a
> total of about 400 times, so any code change is going to be a fairly
> major investment. I'm hoping there is some compiler option that I
> have yet to find that will sort this out for me. Does it exist?
No. But…
> Barring that, is my best option to modify the Intel-based build to
> emit lower-case names and rename all these functions to lower case in
> the C code?
Yes, that sounds like the best option, with minimal modifications. It is also the default option for Intel and many other compilers, anyway.
If your C code has homogeneous coding style, a systematic change is relatively simple to make. A function would be anything that matches the regular expression "^\s*(void|int|float|double)\s+[A-Z0-9]+(" so you could do it e.g. with a sed command:
sed -e "s@^\(\s*(void|int|float|double)\s+\)\([A-Z0-9]+\s*\)(@\1\L\2(@"
Then review the changes.
Hope this helps.
FX
More information about the Fortran
mailing list