From 81d7c24a59bf4a991fe57579aa11a32b32779680 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 1 Jul 2022 12:57:56 -0400 Subject: Add warning_level=everything Adds a new maximum warning level that is roughly equivalent to "all warnings". This adds a way to use `/Wall` with MSVC (without the previous broken warning), `-Weverything` with clang, and almost all general warnings in GCC with strictness roughly equivalent to clang's `-Weverything`. The GCC case must be implemented by meson since GCC doesn't provide a similar option. To avoid maintenance headaches for meson, this warning level is defined objectively: all warnings are included except those that require specific values or are specific to particular language revisions. This warning level is mainly intended for new code, and it is expected (nearly guaranteed) that projects will need to add some suppressions to build cleanly with it. More commonly, it's just a handy way to occasionally take a look at what warnings are present with some compiler, in case anything interesting shows up you might want to enable in general. Since the warnings enabled at this level are inherently unstable with respect to compiler versions, it is intended for use by developers and not to be set as the default. --- docs/markdown/snippets/warning_level_everything.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 docs/markdown/snippets/warning_level_everything.md (limited to 'docs/markdown/snippets') diff --git a/docs/markdown/snippets/warning_level_everything.md b/docs/markdown/snippets/warning_level_everything.md new file mode 100644 index 0000000..5558cf5 --- /dev/null +++ b/docs/markdown/snippets/warning_level_everything.md @@ -0,0 +1,5 @@ +## `warning-level=everything` option + +The new `everything` value for the built-in `warning_level` enables roughly all applicable compiler warnings. +For clang and MSVC, this simply enables `-Weverything` or `/Wall`, respectively. +For GCC, meson enables warnings approximately equivalent to `-Weverything` from clang. -- cgit v1.1