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

CMake test fails with strict diagnostic options for Intel compilers #193

Open
zaikunzhang opened this issue Apr 22, 2024 · 3 comments · May be fixed by #196
Open

CMake test fails with strict diagnostic options for Intel compilers #193

zaikunzhang opened this issue Apr 22, 2024 · 3 comments · May be fixed by #196
Assignees
Labels
bug Something isn't working c Issues related to the C interface or implementation cmake Issues related to CMake

Comments

@zaikunzhang
Copy link
Member

zaikunzhang commented Apr 22, 2024

Hi @nbelakovski ,

I tried adding strict diagnostic options for Intel compilers to cmake.yml:

https://github.com/libprima/prima/compare/5366ab6..ea93390

After that, a few warnings are emitted, which are treated as errors, and the CMake test then fails:

https://github.com/libprima/prima/actions/runs/8790876683

Would you have time to have a look?

I would like to reiterate the following.

  1. Warnings are future bugs. PRIMA does not tolerate warnings, unless they are emitted due to compiler bugs or we are one thousand percent sure that they are irrelevant.

  2. In our development and test, compilers and linters should be invoked with the most strict diagnostic/debugging options, e.g., -Wall -Wextra -Wpedantic -Werror or something similar. This also applies to other code such as C++ and Python.

Thank you very much.

Zaikun

@zaikunzhang zaikunzhang changed the title CMake test does not pass with strict diagnostic options for Intel compilers CMake test fails with strict diagnostic options for Intel compilers Apr 22, 2024
@zaikunzhang zaikunzhang added c Issues related to the C interface or implementation cmake Issues related to CMake bug Something isn't working labels Apr 22, 2024
@zaikunzhang
Copy link
Member Author

Hi Alexis @amontoison,

Could you have a look at this? Thank you.

Best regards,
Zaikun

@amontoison
Copy link
Member

amontoison commented Apr 24, 2024

Hi @zaikunzhang!
The issue is that you have some headers of C functions in prima.c.
They should in a *.h file.
I suppose that they are not in prima.h because you don't want to export them but we can create another header file.

More details: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54817

@zaikunzhang
Copy link
Member Author

Thank you @amontoison . Could you propose the changes by a PR?

There are also other warnings/ errors of different nature.

Many thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working c Issues related to the C interface or implementation cmake Issues related to CMake
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants