summaryrefslogtreecommitdiff
path: root/gcc/diagnostic-core.h
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2010-06-21 16:58:57 -0400
committerDJ Delorie <dj@gcc.gnu.org>2010-06-21 16:58:57 -0400
commitcd7fe53b723e8f24dc2efc21bc68a2ac174ee882 (patch)
treebed45f50f0a58fddadbef5bd923786107ade4104 /gcc/diagnostic-core.h
parentfa188ff0f28cb5fe194837825d41dea4e5aa3cdc (diff)
downloadgcc-cd7fe53b723e8f24dc2efc21bc68a2ac174ee882.tar.gz
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
Diffstat (limited to 'gcc/diagnostic-core.h')
-rw-r--r--gcc/diagnostic-core.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/diagnostic-core.h b/gcc/diagnostic-core.h
index b5047164002..674bad608aa 100644
--- a/gcc/diagnostic-core.h
+++ b/gcc/diagnostic-core.h
@@ -32,7 +32,10 @@ typedef enum
#define DEFINE_DIAGNOSTIC_KIND(K, msgid) K,
#include "diagnostic.def"
#undef DEFINE_DIAGNOSTIC_KIND
- DK_LAST_DIAGNOSTIC_KIND
+ DK_LAST_DIAGNOSTIC_KIND,
+ /* This is used for tagging pragma pops in the diagnostic
+ classification history chain. */
+ DK_POP
} diagnostic_t;
extern const char *progname;