On Thu, 21 Jul 2011, Jakub Jelinek wrote:

> So 
> 
>       gcc_checking_assert (save_decoded_options[j].canonical_option[0][0] == 
> '-');
>       switch (save_decoded_options[j].canonical_option[0][1])
> 
> instead?  The reason for checking the option text instead of code

Yes.

> was just because there are hundreds of -W options etc. and I didn't want to
> list them all and create a maintanance nightmare.

Flags such as CL_WARNING and the various bit-fields in struct cl_option 
(bit-fields are preferred if --help doesn't need to care about a property 
of an option) could be used, but I don't think it would really be an 
improvement in this case.

> If -no can't make it to cc1, I'll drop it.  Is -fdump* checking that way
> ok (with the orig_option_with_args_text -> canonical_option[0] change)?

Yes, that seems reasonable.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to