This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/49654] Linear search through options in handle_pragma_diagnostic
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 23 Sep 2015 13:07:40 +0000
- Subject: [Bug c/49654] Linear search through options in handle_pragma_diagnostic
- Auto-submitted: auto-generated
- References: <bug-49654-4 at http dot gcc dot gnu dot org/bugzilla/>
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