On Thu, 5 Nov 2015, Joseph Myers wrote:
> On Wed, 4 Nov 2015, Martin Sebor wrote:
> 
> > Improving the compiler output is a good idea. The attached patch
> > prints "[disabled by -O0]" instead of "[enabled]" when an optimization
> > option is enabled by default but when optimization (i.e., -O1 or
> > greater) is not enabled.
> 
> I don't think it's entirely accurate that all options marked as 
> Optimization in *.opt are actually disabled by -O0.  Many are, but it 
> depends on the actual logic controlling each optimization.

Indeed, and Richard already pointed that out when reviewing (my) previous
attempt.  Martin, please review the thread ending at
https://gcc.gnu.org/ml/gcc-patches/2012-05/msg00113.html

I guess eventually we can slightly overhaul optimization options to remove
such ambiguities, but in short term I see no way to accurately determine
whether a pass/option is ultimately in effect or not.

Martin, what about taking Richard's suggestion, tacking a short explanatory
sentence onto the end of --help=optimizers output?

Thanks.
Alexander

Reply via email to