Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
davidpfister opened this issue Apr 9, 2024 · 1 comment
Open

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

davidpfister opened this issue Apr 9, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@davidpfister
Copy link

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 davidpfister added the enhancement New feature or request label Apr 9, 2024
@zoziha
Copy link
Contributor

zoziha commented Apr 10, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants