[PATCH] clarify documentation of -Q --help=optimizers
Tue Nov 3 10:19:00 GMT 2015
On Thu, 22 Oct 2015, Martin Sebor wrote:
> [Sending to the right list this time]
> The documentation of the -Q --help=optimizers options leads some
> to expect that when options are reported as enabled imply the
> corresponding optimization will take place. (See the following
> question on gcc-help:
> The patch below tries to make it clear that that's not always
> the case.
The issue is due to optimization passes being skipped at -O0, and yet
corresponding optimization options not explicitely disabled. The effect of -O
is an old source of confusion, and now the intro to "Optimization Options"
Most optimizations are only enabled if an -O level is set on the command
line. Otherwise they are disabled, even if individual optimization flags
(added with this patch:
As we observe, it's not visible enough, and I'm not sure saying that again in
the documentation (in a different section) is a good way to go. Maybe we'd
warn for attempts to enable optimizations at -O0, but that's not trivial.
Perhaps go with Richard's suggestion in the end of this mail ("Thus, at the
end of --help-optimizers print ...")?
More information about the Gcc-patches