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

Build xtb and its dependencies with -Wall -Wextra without warnings #1142

Open
foxtran opened this issue Dec 1, 2024 · 2 comments
Open

Build xtb and its dependencies with -Wall -Wextra without warnings #1142

foxtran opened this issue Dec 1, 2024 · 2 comments

Comments

@foxtran
Copy link
Contributor

foxtran commented Dec 1, 2024

Compilation of xtb with -Wall -Wextra gives a lot of warnings. Most of them are useless like unused variables and equality comparison of reals, but in some places they marks possible problems like

Warning: Possible change of value in conversion from REAL(8) to INTEGER(4) at

that may leads to bugs.

Compilation of xtb with GCC should be warnings-free.

At the first stage, compilation of xtb (and its deps) with -Wall -Wextra -Wno-unused-variable -Wno-maybe-uninitialized -Wno-unused-dummy-argument -Wno-unused-function -Wno-unused-parameter -Wno-compare-reals should not give any warnings. Later, -Wno- flags should be also removed.

@awvwgk
Copy link
Member

awvwgk commented Dec 1, 2024

GFortran has many false positives for -Wmaybe-uninitialized for allocatable variables with automatic left hand side allocation, therefore I would be careful with using -Wall -Wextra, but in principle I would agree that compilation should be warning free.

@foxtran
Copy link
Contributor Author

foxtran commented Dec 1, 2024

Yep, that is why I suggest to skip this flag at the first stage

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

No branches or pull requests

2 participants