Strict fortran77 compiler? (or gfortran compiler flag)

你。 提交于 2019-12-01 22:01:03

问题


Is there any way to get gfortran to reject the f95 additions to Fortran 77? If not, is there another f77-only compiler available for unix systems?

I've tried using the -std=legacy flag but that only seems to remove depreciation warnings from f77 programs; the f95 enhancements still work fine.


回答1:


You can set fixed format with

gfortran -ffixed-form -ffixed-line-length-none [sourcefiles]

And this can actually make a difference (I have a program here where this changes the output!).

I’m pretty sure that there are options, which disable at least most of the f95 features.



来源:https://stackoverflow.com/questions/17004270/strict-fortran77-compiler-or-gfortran-compiler-flag

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!