[Fortran] Modernize `call flush`
In old days, some compilers did not support flush statement or support flush via call. So, some codebases uses flush as
call flush(file_descriptor)
It would be nice to have a suggestion for replacing call flush with flush statement.
Related to PWR075
Hi @foxtran,
Thank you for your feedback to improve the Open Catalog!
I agree this is related to PWR075, since it involves compiler extensions. Out of curiosity, do you know of any particular compiler that rejects the call form? I've tried the latest gfortran, flang, and ifx, and they still seem to accept it.
Given the current scope of PWR075 (provide a general introduction on how compiler-specific extensions can lead to portability issues), I think that we could document specific scenarios such as yours as supplemental code examples, rather than expanding the main README. If you'd like, please feel free to submit a PR! Otherwise, no worries, we'll note your feedback and keep the issue open until it's been handled.
Out of curiosity, do you know of any particular compiler that rejects the call form?
It is NAG compiler.
FYI: gfortran, ifort/ifx, nvfortran, oracle fortran compiler, llvm-flang, AOCC, Cray Fortran, I do not see this issue.
Out of curiosity, do you know of any particular compiler that rejects the call form?
It is NAG compiler.
FYI: gfortran, ifort/ifx, nvfortran, oracle fortran compiler, llvm-flang, AOCC, Cray Fortran, I do not see this issue.
I see, thanks for the detail!