This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [DOC] List the options enabled by Wextra
- From: Gerald Pfeifer <gerald at pfeifer dot com>
- To: Manuel López-Ibáñez <lopezibanez at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 14 Oct 2007 14:29:49 +0200 (CEST)
- Subject: Re: [DOC] List the options enabled by Wextra
- References: <6c33472e0710011346t4e6e6813nd375e468deb39d6b@mail.gmail.com>
Thanks for this further cleanup, Manual. I wanted to review this
carefully, which took a bit.
On Mon, 1 Oct 2007, Manuel López-Ibáñez wrote:
> The options enabled by Wextra are listed explicitly. This avoids
> duplicated descriptions. This list is the real list according to
> gcc/c-opts and gcc/opts.c. Yes, Wuninitialized is enabled by Wextra.
+There are warning flags are not implied by @option{-Wall}.
^^^ ^^^
I believe we've got on "are" too much here? How about "Note that some
warnings flags actually are not implied by @option{-Wall}."?
+the warning. Some of them are enabled by @option{-Wextra} but many of
+them must be individually enabled.
"...be enabled individually".
+@item -Wextra
+@opindex W
+@opindex Wextra
+(This option used to be called @option{-W}. The older name is still
+supported, but the newer name is more descriptive.) This enables some
+extra warning flags that are not enabled by @option{-Wall}:
While we are at it, how about starting with the description (the last
sentence) and the add the note on on -W? That is, switch these two
parts of the description? What do you think?
+-Wuninitialized @r{(only with} @option{-O1}@r{,} @option{-O2} @r{or} @option{-O3}@r{)} @gol
How about making the second part of this read "@option{-O1} and above"?
Also, it seems that -Wuninitialized itself does not refer to -Wextra?
Should this be added?
+The option @option{-Wextra} also prints warning messages for these
+events:
How about making this "...for the following cases"?
+@item
+(C++ only) An enumerator and a non-enumerator both appear in a conditional expression.
This lines seems overly long.
+@item
+(C++ only) A non-static reference or non-static @samp{const} member appears in a
+class without constructors.
Same here. (I know the last two issues already predate your patch, but
since we are already making a change here, let's fix this on the way.)
Gerald
:REVIEWPATCH.