http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53072
--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2012-04-24 14:43:16 UTC --- On Tue, 24 Apr 2012, manu at gcc dot gnu.org wrote: > Say we have: A enables B enables C. Do we actually need to track that C was > enabled by B or by A? Sorry I cannot imagine what for. The idea is that -WB -Wno-B leaves C disabled, but -WB -Wno-A leaves it enabled (because -WB is more specific than -Wno-A, it takes precedence whatever the ordering of those two options). If there were any option -WC or -Wno-C on the command line, the last such option would apply regardless of the -WA / -Wno-A / -WB / -Wno-B options (that much at least is already implemented for some option implications). > For warning options, it is sufficient to track the C was enabled by other > option different from C. It seems we have most of the infrastructure to do Even for that, you still need to move away from _set being a boolean, since there will be three values (default, explicit -WC / -Wno-C, controlled by some other option but not the most specific option). > this, however, it is unclear how to use this infrastructure to make Init() > useful again, or implement PR 53063. Init() should I think ideally be just for the defaults (with _set replacing the present uses of -1 or 2 in Init to mean "not set").