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]

Re: [PATCH] Change default optimization level to -Og


Andrew Pinski wrote:

> I think this goes against what most folks are used to.  I know you are
> saying most folks are used to a compiler defaulting to optimizations
> on but I don't think that is true.  In fact GCC has been this way
> since day one.

Well it may depend which part of the industry you're coming from. GCC 
certainly has a long history doing it one way, however other compilers took
a different approach and have supported optimized debugging for decades.
So I don't understand the use of having a "turn every optimization off" option,
let alone for it to be the default today...

> Plus you also missed changing the following part of the documentation:
> If you are not using some other optimization option, consider using
> -Og (see Optimize Options) with -g. With no -O option at all, some
> compiler passes that collect information useful for debugging do not
> run at all, so that -Og may result in a better debugging experience.

Sure, the doc part of the patch will need further revision if we agree to
change the default.

Wilco


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