On 12 May 2012 17:18, Gabriel Dos Reis <g...@integrable-solutions.net> wrote: > On Sat, May 12, 2012 at 10:12 AM, Joseph S. Myers > <jos...@codesourcery.com> wrote: >> I don't think common.opt should have LangEnabledBy listing different >> languages, though; that information should be in the front ends' .opt >> files. > > Agreed.
Ideally, yes. But how? Let's set aside for a moment whether Wunused or Wall should be common or language-specific. Let's assume C-specific option -Wx enables common option -Wy. How can I record this information in c.opt? Using Wx LangEnables(C, Wy) does not work for those cases that require 2 options to enable a third, like Wextra && Wunused enabled Wunused-parameter. But lets set aside that problem also: Wx ..... LangEnables(C C++, Wy) but then, if Wx is common, and Wy is C/C++ specific, we have exactly the same problem as in the first case for: Wy .... LangEnabledBy(C C++, Wx) I don't see how we can avoid to record language-specific info in common.opt, unless we restrict which options can enable other options. With LangEnabledBy, lang-specific options won't be able to selectively enable common options. With LangEnables, common options won't be able to selectively enable lang-specific options. Both limitations seem too strict to me. Perhaps you had something in mind already? Cheers, Manuel.