Re: [PATCH c-family/49654/49655] reject invalid options in pragma diagnostic

2015-09-23 Thread Marek Polacek
On Tue, Sep 22, 2015 at 08:08:28PM +0200, Manuel López-Ibáñez wrote: > + else if (!(cl_options[option_index].flags & lang_mask)) > +{ > + char * ok_langs = write_langs (cl_options[option_index].flags); > + char * bad_lang = write_langs (c_common_option_lang_mask ()); Please remove t

Re: [PATCH c-family/49654/49655] reject invalid options in pragma diagnostic

2015-09-23 Thread Bernd Schmidt
On 09/22/2015 08:08 PM, Manuel López-Ibáñez wrote: Use find_opt instead of linear search through options in handle_pragma_diagnostic (PR 49654) and reject non-warning options and options not valid for the current language (PR 49655). + /* option_string + 1 to skip the initial '-' */ + unsign

[PATCH c-family/49654/49655] reject invalid options in pragma diagnostic

2015-09-22 Thread Manuel López-Ibáñez
Use find_opt instead of linear search through options in handle_pragma_diagnostic (PR 49654) and reject non-warning options and options not valid for the current language (PR 49655). Boot&tested on x86_64-linux-gnu. OK? gcc/testsuite/ChangeLog: 2015-09-22 Manuel López-Ibáñez PR c/49655