This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] PR 53063 encode group options in .opt files


On Sat, 12 May 2012, Manuel López-Ibáñez wrote:

> 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

Wy
LangEnabledBy(C C++, Wx)

There is no restriction on c.opt to contain only options marked as 
specific to C-family languages - though it's clearly a bad idea to have 
entries there with nothing at all C-family-specific about them.  All the 
entries for an option in all .opt files are merged by opt-gather.awk 
before the other awk code deals with them.  (You'd need to handle having 
multiple LangEnabledBy fields on the merged option produced by 
opt-gather.awk, but the principle is clear.)

-- 
Joseph S. Myers
joseph@codesourcery.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]