[PATCH] clarify documentation of -Q --help=optimizers

Martin Sebor msebor@gmail.com
Thu Nov 5 02:40:00 GMT 2015


On 11/04/2015 06:09 PM, Sandra Loosemore wrote:
> On 11/04/2015 04:52 PM, Martin Sebor wrote:
>
>> gcc/ChangeLog:
>> 2015-11-04  Martin Sebor  <msebor@redhat.com>
>>
>>     * opts.c (print_filtered_help): Indicate when an optimization option
>>     is disabled as a result of -O0.
>>     * doc/invoke.texi: Further clarify the effect of -O options
>>     on individual optimization options.
>
> invoke.texi is a huge file.  In ChangeLogs, please use (node name) to
> indicate which sections have been changed unless the changes really do
> apply throughout the whole file.
>
>> @@ -1509,6 +1509,14 @@
>>  disabled or set to a specific value (assuming that the compiler
>>  knows this at the point where the @option{--help=} option is used).
>>
>> +It's important to remember that when a given optimization option is
>> +enabled, either explicitly on the command line or implicitly, whether
>> +or not the optimization it controls will be performed during an
>
> s/will be performed/is performed/
>
>> +Finally, the following example shows the difference in output for
>> +an option that, while technically enabled, is disabled as a consequence
>> +of the implicit @option{-O0} option, and for one that is disabled by
>> +default.  This distinction is typically only of interest to GCC
>> developers.
>
> If the distinction is only interesting to developers, why does it need
> an example in GCC's user documentation?  :-S

Thank you for the feedback. I'll incorporate it into the next version
of the patch.

The point of the example is to make it clear to users that despite
the different output the effect of both kinds of options on
optimization is the same (i.e., none). I made the output different
only because I expect the distinction between the state of the two
kinds of options to be of interest to GCC developers. Otherwise,
it could just say [disabled] for both.

Martin



More information about the Gcc-patches mailing list