This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/49654] Linear search through options in handle_pragma_diagnostic


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]