LLNL / sundials

Official development repository for SUNDIALS - a SUite of Nonlinear and DIfferential/ALgebraic equation Solvers. Pull requests are welcome for bug fixes and minor changes.
https://computing.llnl.gov/projects/sundials
BSD 3-Clause "New" or "Revised" License
526 stars 130 forks source link

CI: Update Compiler Warnings, Enable Warnings as Errors #484

Closed gardner48 closed 6 months ago

gardner48 commented 6 months ago
gardner48 commented 6 months ago

CI failures should be resolved as related PRs are merged

Steven-Roberts commented 6 months ago

When building in single precision, -Wdouble-promotion causes tons of warnings from printf which can't be helped. Maybe it should be added conditionally.

gardner48 commented 6 months ago

When building in single precision, -Wdouble-promotion causes tons of warnings from printf which can't be helped. Maybe it should be added conditionally.

Is there a configuration where we could have this flag and avoid the warnings from printf?

Steven-Roberts commented 6 months ago

Is there a configuration where we could have this flag and avoid the warnings from printf?

When precision is set to extended, -Wdouble-promotion is most useful. It's also fine to have the flag when precision is double, but it's not going to identify any promotion warnings.

gardner48 commented 6 months ago

When precision is set to extended, -Wdouble-promotion is most useful. It's also fine to have the flag when precision is double, but it's not going to identify any promotion warnings.

Ah yes, the docs only talk about float to double promotion but it makes sense this would for double to long double promotion as well. I'll update this in a sec.