This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [doc PATCH] fix up C++ option references (PR 71283)


On 04/11/2018 09:44 AM, Jason Merrill wrote:
On 04/05/2018 07:28 PM, Martin Sebor wrote:
Attached is the final version of the patch to adjust the lists
of options (C++ Language Options and -Wall) to include missing
C++ options, reference the forms of options that aren't
the default, and use TexInfo tables for the lists of options
in -Wall and -Wextra to address Nathan's comment.  The patch
also fixes bug 71283.

 -Wnoexcept  -Wnoexcept-type  -Wclass-memaccess @gol
...
+-Wclass-memaccess -Wclobbered  -Wcomment  -Wconditionally-supported @gol

-Wclass-memaccess is already in the C++ options summary, I don't think
we need to also add it to the diagnostic options summary.

Some of these C++-only options are listed in 3.8 Options to
Request or Suppress Warnings which the See Options to Request
or Suppress Warnings link under Warning Options points to.

I would expect all the warning options mentioned anywhere in
3.8 to be listed in the Warning Options summary.  That would
include all C++-only options in -Wall and -Wextra but not
other C++-only options (at least not for now).  That's what
I'm aiming for with the patch; I may have missed some.

It seems to me that the most intuitive organization might
actually be to list all warning options in the Warning Summary
section, even if some of them are specific to just a subset of
languages and also listed in language-specific sections.  (At
least for the C family.)

I often have 3.8 Options to Request or Suppress Warnings open
in my browser and use it to search for all warning options.
I find it inconvenient (and prone to error) to have to remember
to also open 3.5 Options Controlling C++ Dialect to look for
C++-only options that aren't listed in 3.5.

Does the approach sound like an improvement to you?

-@item -Wclass-memaccess @r{(C++ and Objective-C++ only)}
+@item -Wclass-memaccess @r{(C++ only)}

You removed "and Objective-C++" only for this option?  Let's either
change all of them or none.

I think that was a mistake.  The option is valid for ObjC++
so let me put it back.

-@item -Wsubobject-linkage @r{(C++ and Objective-C++ only)}
+@item -Wno-subobject-linkage @r{(C++ and Objective-C++ only)}
 @opindex Wsubobject-linkage
 @opindex Wno-subobject-linkage
 Warn if a class type has a base or a field whose type uses the anonymous

-@item -Wdelete-incomplete @r{(C++ and Objective-C++ only)}
+@item -Wno-delete-incomplete @r{(C++ and Objective-C++ only)}
 @opindex Wdelete-incomplete
 @opindex Wno-delete-incomplete
 Warn when deleting a pointer to incomplete type, which may cause

If you're reversing the sense of the flag, please adjust the
documentation to match.

Not sure I understand what part you think needs adjusting.
I changed it to -Wno- to reflect that the option is enabled
by default.  Can you elaborate?

Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]