On 2015.12.14 at 11:20 -0500, Trevor Saunders wrote: > On Mon, Dec 14, 2015 at 10:01:27AM +0100, Richard Biener wrote: > > On Sun, Dec 13, 2015 at 9:03 PM, Andi Kleen <a...@firstfloor.org> wrote: > > > Markus Trippelsdorf <mar...@trippelsdorf.de> writes: > > > > > >> Many developers are still using __attribute__((optimize())) in > > >> production code, although it quite broken. > > > > > > Wo reads documentation? @) If you want to discourage it better warn once > > > at runtime. > > > > We're also quite heavily using it in LTO internally now. > > besides that does this really make sense? I suspect very few people are > using this for the fun of it. I'd guess most usage is to disable > optimizations to work around bugs, or maybe trying to get a very hot > function optimized more. Either way I suspect its only used by people > with good reason and this would just really iritate them.
Well, if you look at bugzilla you'll find several wrong code bugs caused by this attribute, e.g.: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59262 Also Richi stated in the past (I quote): »I consider the optimize attribute code seriously broken and unmaintained (but sometimes useful for debugging - and only that).« https://gcc.gnu.org/ml/gcc/2012-07/msg00201.html -- Markus