swig-fortran / swig

This fork of SWIG creates Fortran wrapper code from C++ headers.
http://www.swig.org
Other
42 stars 11 forks source link

Disable auto-creation of subroutine from function to avoid generating invalid code #120

Closed sethrj closed 5 years ago

sethrj commented 5 years ago
void foo(int);
int foo();

would generate two nearly-identical subroutines; the only difference was that the second had an "optional" qualifier on the argument. These ambigous procedures would not compile.

Instead of trying to automatically convert functions to subroutines, we now just warn and ignore. The documentation is updated to reflect the new behavior and also describe %fortransubroutine.