From 54c09c98a67219ba2cf70c4bb23f80990db37066 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Fri, 23 Sep 2022 09:06:22 +0200 Subject: [PATCH] warnings, manywarnings: Doc fixes. * doc/manywarnings.texi (manywarnings): Improve usage instruction. Start list of comments on particular warning flags, based on comment from Paul Eggert . * doc/warnings.texi (warnings): Mention that it is often used with manywarnings. --- ChangeLog | 8 ++++++++ doc/manywarnings.texi | 14 +++++++++++++- doc/warnings.texi | 4 +++- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a6399f1048..5b5804df68 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2022-09-23 Simon Josefsson + + warnings, manywarnings: Doc fixes. + * doc/manywarnings.texi (manywarnings): Improve usage instruction. + Start list of comments on particular warning flags, based on + comment from Paul Eggert . + * doc/warnings.texi (warnings): Mention that it is often used with manywarnings. + 2022-09-21 Paul Eggert assert-h: suppress clang false alarms diff --git a/doc/manywarnings.texi b/doc/manywarnings.texi index 1b3e5907be..7ab3f09cee 100644 --- a/doc/manywarnings.texi +++ b/doc/manywarnings.texi @@ -32,7 +32,7 @@ go through the list of warnings. You will likely deactivate warnings that occur often and don't point to mistakes in the code, by adding them to the @samp{nw} variable, then reconfiguring and recompiling. When warnings point to real mistakes and bugs in the code, you will of course not disable -them. +them but fix your code to silence the warning instead. There are also many GCC warning options which usually don't point to mistakes in the code; these warnings enforce a certain programming style. It is a @@ -44,3 +44,15 @@ When a new version of GCC is released, you can add the new warning options that it introduces into the @code{gl_MANYWARN_ALL_GCC} macro (and submit your modification to the Gnulib maintainers :-)), and enjoy the benefits of the new warnings, while adding the undesired ones to the @samp{nw} variable. + +Comments on particular warning flags: + +@table @samp + +@item -Wsign-compare +Clang generates too many false alarms with -Wsign-compare, and we don't +recommend that warning. Programs using Gnulib generally don't enable +that warning when compiling Gnulib code. If you happen to find a real +bug with that warning we'd like to know it. + +@end table diff --git a/doc/warnings.texi b/doc/warnings.texi index 1836c04325..47ce633250 100644 --- a/doc/warnings.texi +++ b/doc/warnings.texi @@ -2,7 +2,9 @@ @section warnings The @code{warnings} module allows to regularly build a package with more -GCC warnings than the default warnings emitted by GCC. +GCC warnings than the default warnings emitted by GCC. It is often used +indirectly through the @code{manywarnings} module +(@pxref{manywarnings}). It provides the following functionality: -- 2.39.5