> > > Given all warning options can be enabled/disabled via #pragma GCC > > > diagnostic > > > all Warning annotated options should be implicitely 'Optimization' for > > > the purpose > > > of LTO streaming then? > > > > Well, perhaps they can be marked but for late optimizations this does > > not work > > __attribute__ ((warning("haha"))) test() { } > > #pragma gcc diagnostic ignore "-Wattribute-warning" > > test2() { test(); } > > > > We have many warning options but only few of them are late - it would be > > nice to have them explicitly marked somehow IMO (by design and to avoid > > streaming a lot of useless flags) > > Hmm, indeed. Well, I belive we use the 'Optimization' flag for other purposes > than only triggering LTO streaming and option save/restore, so we need another > flag that only triggers save/restore then (and also allow us to avoid > dropping the > flag at lto-option streaming time where we currently drop all warning > options).
Yep. I was not aware of any other use of "Optimization" flag, but definitly it is misnamed in this context (as is OPTIMIZATION_NODE btw). Honza > > Richard. > > > honza > > > > > > > > Richard. > > > > > > > Honza