Re: enabling optimizations (-Og) with --enable-debug

2016-11-29 Thread Michael Stahl
On 01/15/2015 01:47 PM, Luke Deller wrote: > Hi, > > I saw that gcc-4.8 introduced a new optimization level -Og which enables > optimizations that do not interfere with debugging. > > Yesterday I floated the idea on IRC of using this with --enable-debug > rather than -O0 if available, and some

Re: enabling optimizations (-Og) with --enable-debug

2015-01-16 Thread Ashod Nakashian
On Fri, Jan 16, 2015 at 8:21 AM, Norbert Thiebaud wrote: > > On Fri, Jan 16, 2015 at 4:15 AM, Stephan Bergmann wrote: > > On 01/15/2015 10:47 PM, Ashod Nakashian wrote: > >> > >> It probably is, but with some caveats. My main concern would be > >> unnecessary code pollution. It's true that these

Re: enabling optimizations (-Og) with --enable-debug

2015-01-16 Thread Norbert Thiebaud
On Fri, Jan 16, 2015 at 4:15 AM, Stephan Bergmann wrote: > On 01/15/2015 10:47 PM, Ashod Nakashian wrote: >> >> It probably is, but with some caveats. My main concern would be >> unnecessary code pollution. It's true that these warnings could be >> really useful. They might hint at actual issues i

Re: enabling optimizations (-Og) with --enable-debug

2015-01-16 Thread Stephan Bergmann
On 01/15/2015 10:47 PM, Ashod Nakashian wrote: It probably is, but with some caveats. My main concern would be unnecessary code pollution. It's true that these warnings could be really useful. They might hint at actual issues in some cases (for example an unhandled error in the unused-result case

Re: enabling optimizations (-Og) with --enable-debug

2015-01-16 Thread Stephan Bergmann
On 01/15/2015 01:47 PM, Luke Deller wrote: Yesterday I floated the idea on IRC of using this with --enable-debug rather than -O0 if available, and some feedback was that it enables gcc to report extra warnings which would be a good thing. It /potentially/ enables GCC to emit more (useful) warni

Re: enabling optimizations (-Og) with --enable-debug

2015-01-15 Thread Ashod Nakashian
> Any other thoughts on whether this is a good idea to pursue? It probably is, but with some caveats. My main concern would be unnecessary code pollution. It's true that these warnings could be really useful. They might hint at actual issues in some cases (for example an unhandled error in the unu

enabling optimizations (-Og) with --enable-debug

2015-01-15 Thread Luke Deller
Hi, I saw that gcc-4.8 introduced a new optimization level -Og which enables optimizations that do not interfere with debugging. Yesterday I floated the idea on IRC of using this with --enable-debug rather than -O0 if available, and some feedback was that it enables gcc to report extra warni