Skip to content

Revised handling of unknown warnings#554

Merged
xavierleroy merged 1 commit intomasterfrom
unknown-warnings
Aug 19, 2025
Merged

Revised handling of unknown warnings#554
xavierleroy merged 1 commit intomasterfrom
unknown-warnings

Conversation

@xavierleroy
Copy link
Contributor

Currently, unrecognized warning options -Wsome-unknown-warning are fatal errors.

As suggested in #552, this PR makes sure that -Wsome-unknown-warning is a warning (by default), and that -Wno-some-unknown-warning is ignored. This is what GCC and Clang do.

This commit also introduces the unknown-warning-option warning, so that warnings about unknown warnings can be ignored (-Wno-unknown-warning-option) or turned into an error (-Werror=unknown-warning-option). This is what Clang does.

Closes: #552

`-W<some unknown warning>` is now (by default) a warning (not a fatal error)
and `-Wno-<some unknown warning>` is ignored.
This is what GCC and Clang do.

This commit also introduces the `unknown-warning-option` warning, so
that warnings about unknown warnings can be ignored
(`-Wno-unknown-warning-option`) or turned into an error
(`-Werror=unknown-warning-option`).  This is what Clang does.

Closes: #552
@xavierleroy xavierleroy merged commit 771f79d into master Aug 19, 2025
7 checks passed
@xavierleroy xavierleroy deleted the unknown-warnings branch February 25, 2026 08:04
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

Successfully merging this pull request may close these issues.

Downgrade unrecognized -W<warning> from an error to a warning

1 participant