You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As already noted in the guide, adding a general -Werror for all warnings has a lot of negatives, as it makes compilation very dependent on a specific version of a specific compiler. However, adding specific warnings for specific cases does not have this downside. We should probably do more of it.
In this case, these turn "should never do that" cases into outright errors. Raising an error for implicit function declaration is also part of #339. I worry that autoconf might have some implicit function declarations (at least for exit()) - we may need to determine how to deal with that and document it.
Possible other options, though I'm not as confident:
Florian Weimer's 2018 article "Recommended compiler and linker flags for GCC" has a number of interesting ideas. We should review it for options.
At the very least, I like adding these options:
As already noted in the guide, adding a general
-Werrorfor all warnings has a lot of negatives, as it makes compilation very dependent on a specific version of a specific compiler. However, adding specific warnings for specific cases does not have this downside. We should probably do more of it.In this case, these turn "should never do that" cases into outright errors. Raising an error for implicit function declaration is also part of #339. I worry that autoconf might have some implicit function declarations (at least for exit()) - we may need to determine how to deal with that and document it.
Possible other options, though I'm not as confident:
Some discussion about implicit function breakage is here:
https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213
The text was updated successfully, but these errors were encountered: