-
- Downloads
diagnostic.h (diagnostic_classification_change_t): New.
* diagnostic.h (diagnostic_classification_change_t): New. (diagnostic_context): Add history and push/pop list. (diagnostic_push_diagnostics): Declare. (diagnostic_pop_diagnostics): Declare. * diagnostic.c (diagnostic_classify_diagnostic): Store changes from pragmas in a history chain instead of the global table. (diagnostic_push_diagnostics): New. (diagnostic_pop_diagnostics): New. (diagnostic_report_diagnostic): Scan history chain to find state of diagnostics as of the diagnostic location. * opts.c (set_option): Pass UNKNOWN_LOCATION to diagnostic_classify_diagnostic. (enable_warning_as_error): Likewise. * diagnostic-core.h (DK_POP): Add after "real" diagnostics, for use in the history chain. * c-family/c-pragma.c (handle_pragma_diagnostic): Add push/pop, allow these pragmas anywhere. * doc/extend.texi: Document pragma GCC diagnostic changes. * gcc.dg/pragma-diag-1.c: New. From-SVN: r161115
Showing
- gcc/ChangeLog 21 additions, 0 deletionsgcc/ChangeLog
- gcc/c-family/c-pragma.c 12 additions, 8 deletionsgcc/c-family/c-pragma.c
- gcc/diagnostic-core.h 4 additions, 1 deletiongcc/diagnostic-core.h
- gcc/diagnostic.c 88 additions, 3 deletionsgcc/diagnostic.c
- gcc/diagnostic.h 28 additions, 1 deletiongcc/diagnostic.h
- gcc/doc/extend.texi 24 additions, 9 deletionsgcc/doc/extend.texi
- gcc/opts.c 4 additions, 2 deletionsgcc/opts.c
- gcc/testsuite/ChangeLog 4 additions, 0 deletionsgcc/testsuite/ChangeLog
- gcc/testsuite/gcc.dg/pragma-diag-1.c 21 additions, 0 deletionsgcc/testsuite/gcc.dg/pragma-diag-1.c
Loading
Please register or sign in to comment