diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2015-09-23 13:07:07 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2015-09-23 13:07:07 +0000 |
commit | c1822f9c9b169c9588a110522dd60d579edaf6d1 (patch) | |
tree | 36263b59f5fe1b8892bd6bafafc963cd33e5923f /gcc/opts.h | |
parent | 9ea4e88f177aec6d897055efc954b4de05766017 (diff) | |
download | gcc-c1822f9c9b169c9588a110522dd60d579edaf6d1.zip gcc-c1822f9c9b169c9588a110522dd60d579edaf6d1.tar.gz gcc-c1822f9c9b169c9588a110522dd60d579edaf6d1.tar.bz2 |
[c-family/49654/49655] reject invalid options in pragma diagnostic
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).
gcc/testsuite/ChangeLog:
2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/49655
* gcc.dg/pragma-diag-6.c: New test.
gcc/ChangeLog:
2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/49655
* opts.h (write_langs): Declare.
* opts-global.c (write_langs): Make it extern.
gcc/c-family/ChangeLog:
2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/49654
PR c/49655
* c-pragma.c (handle_pragma_diagnostic): Detect non-warning
options and options not valid for the current language.
From-SVN: r228049
Diffstat (limited to 'gcc/opts.h')
-rw-r--r-- | gcc/opts.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -368,6 +368,7 @@ extern void control_warning_option (unsigned int opt_index, int kind, struct gcc_options *opts, struct gcc_options *opts_set, diagnostic_context *dc); +extern char *write_langs (unsigned int mask); extern void print_ignored_options (void); extern void handle_common_deferred_options (void); extern bool common_handle_option (struct gcc_options *opts, |