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


On 10/26/2017 01:50 PM, Jakub Jelinek wrote:
> On Thu, Oct 26, 2017 at 05:12:40PM +0000, Wilco Dijkstra wrote:
>> GCC's default optimization level is -O0.  Unfortunately unlike other compilers,
>> GCC generates extremely inefficient code with -O0.  It is almost unusable for
>> low-level debugging or manual inspection of generated code.  So a -O option is
>> always required for compilation.  -Og not only allows for fast compilation, but
>> also produces code that is efficient, readable as well as debuggable.
>> Therefore -Og makes for a much better default setting.
>>
>> Any comments?
>>
>> 2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>
>>
>> 	* opts.c (default_options_optimization): Set default to -Og.
>>
>> doc/
>> 	* invoke.texi (-O0) Remove default mention.
>> 	(-Og): Add mention of default setting.
> 
> This would only severely confuse users.  -Og has lots of unresolved issues
> for debugging experience, and changing the default this way is IMHO
> extremely undesirable.
And changing a default that has been in place for 30 years just seems
unwise at this point.

jeff


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