Is the gfortran flag -ffree-line-length-0 necessary for f95 files? My understanding is that if my Fortran file has the .f95 extension, gfortran will automatically apply the flag -ffree-line-length-0. Is my understanding correct?
As gfortran Manual
GNU Fortran Manual
-ffree-line-length-n
Set column after which characters are ignored in typical free-form lines in the source file. The default value is 132. n may be ‘none’, meaning that the entire line is meaningful. -ffree-line-length-0 means the same thing as -ffree-line-length-none.
if exceed, the compile error shows below
1.f90:3:132:
Error: Line truncated at (1) [-Werror=line-truncation]
Yes, It’s good to put this “-ffree-line-length-none” on the command line with gfortran, otherwise, the default max line length is 132 characters, which I find to be miserably short for any modern 4K monitor. The next Fortran standard is set to hopefully resolve the need for this flag. I think the Intel compiler allows virtually unlimited line length, by default.
Not answering your question, but I recommend not using the .f95 extension. The .f90 extension indicates that a code uses free source form, not that the code conforms to the Fortran 90 standard (which did introduce free source form).
so gfortran will use -ffree-line-length-0 by default in the future? when will this happen?
With the next standard release
https://j3-fortran.org/doc/year/19/19-138r1.txt
A side question, is there any plan to make -fimplicit-none the default flag for gfortran?
Even if it would be default, flags like -std=f2018
would need to enable it again to conform with the respective standard.
I know that there is the proposal to make it the default for fpm, but I am biased