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]

Reorganized documentation for warnings -- attempt 2


Some friendly users in the gcc irc chat informed me that I may be more likely to
get a review for my patch if it weren't a 100 KiB file. This is my attempt at
making the patch a little easier to read.

I'm not sure how important it is for documentation, but I have already sent in
my copyright assignment forms.

ChangeLog text:

Documentation: Reorganized warning options for invoking GCC. Warning options
turned on by -Wall, -Wextra, and -Wpedantic are now grouped together.

Note that some of the earlier patches don't make sense on their own. They
require the later patches for the text to flow.

How to read the patches:

1-rearrange.diff is a reorganization-only patch. It consists entirely of adding
a few new lines and moving other lines around. If you ignore whitespace-only
lines, you should be able to use sort on a patched version of invoke.texi and
the original and not have any differences.

I changed the top of the page to be an overview of -Wall, then -Wextra, then
-Wpedantic. After that, individual warnings are listed with all of the options
turned on by -Wall first, then -Wextra, then -Wpedantic, then warnings not
turned on by any of those, and finally negative warning options to turn off the
defaults. The one intentional exception is -Wformat=2, which I put right after
-Wformat, even though it is not turned on by -Wall. I made a note that
-Wformat=2 is not turned on by any other option.

2-turned-on-by-other.diff applies uniform formatting to all options that are
turned on by other options, and explicitly specifies it for those options. For
instance, all warnings turned on by -Wall state in their description that they
are turned on by -Wall.

3-explicit-Wpedantic lists all warnings that are turned on by -Wpedantic in the
description for that meta-option.

4-0-uniform-turn-off.diff and 4-1-uniform-turn-off.diff list the negative option
for all warnings that are on by default and the positive version for all other
warnings. This is how the overview specifies all warnings are, and most warnings
are like that. This just brings some consistency to the few outliers.

5-Wunused.diff rewords the description of -Wunused to list out all warnings
turned on by it.

6-Wstrict-aliasing.diff removes some redundancy. -Wstrict-aliasing previously
repeated almost all of the same information as -Wstrict-aliasing=N. I combined
them in the same manner as -Wstrict-overflow.

7-Wformat.diff is a little more explicit with what Wformat turns on (and what it
doesn't).

8-Wformat-2-note.diff mentions that Wformat=2 is not turned on by any other
warning option.

Attachment: 1-rearranage.diff.bz2
Description: BZip2 compressed data

Attachment: 2-turned-on-by-other.diff
Description: Binary data

Attachment: 3-explicit-Wpedantic.diff
Description: Binary data

Attachment: 4-0-uniform-turn-off.diff
Description: Binary data

Attachment: 4-1-uniform-turn-off.diff
Description: Binary data

Attachment: 5-Wunused.diff
Description: Binary data

Attachment: 6-Wstrict-aliasing.diff
Description: Binary data

Attachment: 7-Wformat.diff
Description: Binary data

Attachment: 8-Wformat-2-note.diff
Description: Binary data


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