[Bug c/49654] Linear search through options in handle_pragma_diagnostic
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Sep 23 13:07:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49654
--- Comment #2 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Author: manu
Date: Wed Sep 23 13:07:07 2015
New Revision: 228049
URL: https://gcc.gnu.org/viewcvs?rev=228049&root=gcc&view=rev
Log:
[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.
Added:
trunk/gcc/testsuite/gcc.dg/pragma-diag-6.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-pragma.c
trunk/gcc/opts-global.c
trunk/gcc/opts.h
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list