* diagnostic.h (diagnostic_classification_change_t): New.
commit0955be6537c2fd3d21d5a0b385a21fdfc6b5634b
authordj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Jun 2010 20:58:57 +0000 (21 20:58 +0000)
committerdj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Jun 2010 20:58:57 +0000 (21 20:58 +0000)
treebed45f50f0a58fddadbef5bd923786107ade4104
parent99820dd9a9a14ed27bc7d1f2f452eb24ebfa6ebe
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161115 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/c-family/c-pragma.c
gcc/diagnostic-core.h
gcc/diagnostic.c
gcc/diagnostic.h
gcc/doc/extend.texi
gcc/opts.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pragma-diag-1.c [new file with mode: 0644]