On Fri, 11 May 2012, Manuel López-Ibáñez wrote: > >> What cases do we have where a language-independent option enables another > >> language-independent option only for some front ends? That's the only > >> case that should need a language-dependent generated function here. > > > > Wall enables Wunused in Ada Fortran and C family.
Is there a reason for it not to do so for all languages? You only really need a front-end-specific generated function if there's something about the semantics that needs to be different in different front ends. > But the case of lang-indep enables lang-dependent is far more common: > Wextra enables some C-only options. That shouldn't be a problem. You can mark those options as enabled by -Wextra; at most you might need to ensure that enabling a wrong-language option this way doesn't generate the usual warning you get for using a wrong-language option on the command line. There's nothing wrong with having separate autogenerated functions for each language if you want to split things out that way, but it would seem simpler just to have one function called somewhere central, whatever option it is (common or not) that is enabling other options. -- Joseph S. Myers jos...@codesourcery.com