Re: Extended doubt regarding the bug 93432

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 08, 2022 at 05:37:12PM +0000, Jonathan Wakely via Gcc-help wrote:
> It warns with -O1, which is the documented behaviour:
> 
>       The effectiveness of some warnings depends on optimizations also
> being enabled. For example -Wsuggest-final-types is more
>       effective with link-time optimization and -Wmaybe-uninitialized does
> not warn at all unless optimization is enabled.
> 
> So no, I don't think it' a bug. GCC is behaving as designed. Ideally it
> would be better at warning without optimization, but changing that would be
> hard.

GCC does not execute most of its code at -O0.  This is important for
speed of course, but much more importantly it also allows us to use -O0
when other optimisation levels crash or generate wrong code.  This is
useful for the compiler developers of course, but it also is an
important workaround for users, when bad things happen.


Segher



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux