fpm icon indicating copy to clipboard operation
fpm copied to clipboard

`-ffree-line-length-none` should be used by default in tests

Open davidpfister opened this issue 1 year ago • 1 comments

Description

Quite often I use cpp macro for defining assert functions in unit tests. Every now and then I end up we a very long line and because this is not possible to use & continuation line syntax in preprocessed macros, there is not much I can do about except passing the flag -ffree-line-length-none to gfortran.

Possible Solution

I would simply propose that this flag is used by default when running fpm test just not to see the message Error: Line truncated at (1) [-Werror=line-truncation]

Additional Information

No response

davidpfister avatar Apr 09 '24 20:04 davidpfister

Given that Fortran-2023 has been released, the line length limit has been relaxed to 10,000 characters, and ifort, ifx are open for this by default, and GFortran already implements the 10,000 character line length limit in -std=f2023 in GCC 14.0. It seems like adding -ffree-line-length-n or -ffree-line-length-10000 to GFortran in fpm would be a good choice in terms of keeping up with the latest developments and making it comfortable for users?

zoziha avatar Apr 10 '24 14:04 zoziha