Skip to content

Conversation

@MarcelRaad
Copy link
Member

GCC doesn't warn for unknown -Wno- options, except if there are other
warnings or errors [0]. This was problematic with CURL_WERROR as that
warning-as-error cannot be suppressed. Notably, this always happened
with -Wno-pedantic-ms-format when not targeting Windows. So test for
the positive form of the warning instead, which should always result in
a diagnostic if unknown.

[0] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

GCC doesn't warn for unknown `-Wno-` options, except if there are other
warnings or errors [0]. This was problematic with `CURL_WERROR` as that
warning-as-error cannot be suppressed. Notably, this always happened
with `-Wno-pedantic-ms-format` when not targeting Windows. So test for
the positive form of the warning instead, which should always result in
a diagnostic if unknown.

[0] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

Closes
Copy link
Contributor

@jzakrzewski jzakrzewski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sensible to me.

@MarcelRaad MarcelRaad deleted the cmake_fix_warning_suppressions branch July 23, 2020 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants