summaryrefslogtreecommitdiff
path: root/gcc/diagnostic.h
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-24 18:55:44 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-24 18:55:44 +0000
commit2c2efebb71479d67bce6320b015253bb408a3496 (patch)
treed6028a1f52919db5575cd7449139f2ab89757163 /gcc/diagnostic.h
parentf955934c261dc2757b87671643376e05b9387009 (diff)
downloadgcc-2c2efebb71479d67bce6320b015253bb408a3496.tar.gz
* diagnostic.c: Don't include flags.h.
(pedantic_warning_kind, permissive_error_kind): Take diagnostic context parameters. Check flags in the context passed as a parameter. (diagnostic_build_prefix): Add context parameter. Check show_column flag in context. (diagnostic_action_after_output): Check fatal_errors flag in context. (diagnostic_report_current_module): Check show_column flag in context. (default_diagnostic_starter): Update call to diagnostic_build_prefix. (diagnostic_report_diagnostic): Pass context to pedantic_warning_kind. (emit_diagnostic): Pass context to permissive_error_kind. (permerror): Pass context to permissive_error_kind. * diagnostic.h (struct diagnostic_context): Add show_column, pedantic_errors, permissive and fatal_errors fields. (diagnostic_build_prefix): Update prototype. * langhooks.c * toplev.c (process_options): Set flags in global_dc from flag_show_column, flag_pedantic_errors, flag_permissive, flag_fatal_errors. * tree-diagnostic.c (default_tree_diagnostic_starter): Update call to diagnostic_build_prefix. * Makefile.in (diagnostic.o): Update dependencies. cp: * error.c (cp_diagnostic_starter): Update call to diagnostic_build_prefix. (cp_print_error_function, print_instantiation_partial_context_line): Check show_column flag in context. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159793 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/diagnostic.h')
-rw-r--r--gcc/diagnostic.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h
index 89c1271bf84..1db91c2cd44 100644
--- a/gcc/diagnostic.h
+++ b/gcc/diagnostic.h
@@ -87,6 +87,18 @@ struct diagnostic_context
/* True if we should raise a SIGABRT on errors. */
bool abort_on_error;
+ /* True if we should show the column number on diagnostics. */
+ bool show_column;
+
+ /* True if pedwarns are errors. */
+ bool pedantic_errors;
+
+ /* True if permerrors are warnings. */
+ bool permissive;
+
+ /* True if errors are fatal. */
+ bool fatal_errors;
+
/* This function is called before any message is printed out. It is
responsible for preparing message prefix and such. For example, it
might say:
@@ -211,7 +223,7 @@ extern void diagnostic_set_info_translated (diagnostic_info *, const char *,
extern bool emit_diagnostic (diagnostic_t, location_t, int,
const char *, ...) ATTRIBUTE_GCC_DIAG(4,5);
#endif
-extern char *diagnostic_build_prefix (diagnostic_info *);
+extern char *diagnostic_build_prefix (diagnostic_context *, diagnostic_info *);
void default_diagnostic_starter (diagnostic_context *, diagnostic_info *);
void default_diagnostic_finalizer (diagnostic_context *, diagnostic_info *);