https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32003

--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
With most of the documentation for each option consisting of "the file name is
made by appending .xxx to the source file name" I agree that in its current
form and state of completion the documentation isn't very useful.

I also suspect that providing descriptions for the currently undocumented
options and saying much more than what's in the boilerplate blurb above is
unlikely.

I like the idea of providing a generic description instead, as long is it makes
it easy to derive the option names.  I had to figure out by trial and error
that the name of the option controlling the Object Size Checking dumps is
-fdump-tree-objsz (by using -fdump-tree-all, looking at the suffix of the two
dump files, and appending it to -fdump-tree-).  But after some experimenting
and poking around in the manual I realize there's a better way to do it:

1) Run GCC with -fdump-passes and look for the pass code (e.g., objsz for
Object Size Checking).
2) Append the pass code to the -fdump-tree- (or -fdump-rtl-) option to enable
the dump.
3) Use the pass code to find the name of the dump file created by GCC for the
pass (unless overridden).

So maybe this would be sufficient documentation for all the options.  The one
thing missing is a description of what each of those passes actually does.  For
some it's fairly obvious but for others not so much.  Maybe a brief description
could be added to GCC's -fdump-passes output to help figure that out (e.g.,
under -fdump-passes=verbose if we want to keep the current output unchanged).

How does this sound?

Reply via email to