]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/c-family/ChangeLog
[c-family/49654/49655] reject invalid options in pragma diagnostic
authormanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 Sep 2015 13:07:07 +0000 (13:07 +0000)
committermanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 Sep 2015 13:07:07 +0000 (13:07 +0000)
commit5eef101dfd81816dbf1a1ba9a0048bfa78af8121
tree36263b59f5fe1b8892bd6bafafc963cd33e5923f
parent6afb59537babffae22e8a0ff98a61626f5b2d8c6
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228049 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-pragma.c
gcc/opts-global.c
gcc/opts.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pragma-diag-6.c [new file with mode: 0644]