summaryrefslogtreecommitdiffstats
path: root/gcc/diagnostic.h
diff options
context:
space:
mode:
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-12 01:05:47 +0000
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-12 01:05:47 +0000
commit5f07bab078ec00fa479c9e5c522d321b43377b2b (patch)
tree4da9d6d58f72a28241619628a1b3f73d75b12303 /gcc/diagnostic.h
parent35cf5a4cf3b060ce2a46462f0daad527d8822baf (diff)
downloadppe42-gcc-5f07bab078ec00fa479c9e5c522d321b43377b2b.tar.gz
ppe42-gcc-5f07bab078ec00fa479c9e5c522d321b43377b2b.zip
* diagnostic.c (real_abort): New.
(diagnostic_report_diagnostic): Call real_abort on error. * diagnostic.h (diagnostic_abort_on_error): New. (struct diagnostic_context): Add abort_on_error field. * toplev.c (setup_core_dumping): New. (decode_d_option): Handle 'H' case. * doc/invoke.texi (Debugging Options): Document -dH. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62753 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/diagnostic.h')
-rw-r--r--gcc/diagnostic.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h
index 2bb0f8af349..2c822fc1617 100644
--- a/gcc/diagnostic.h
+++ b/gcc/diagnostic.h
@@ -1,5 +1,5 @@
/* Various declarations for language-independent diagnostics subroutines.
- Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Gabriel Dos Reis <gdr@codesourcery.com>
This file is part of GCC.
@@ -190,6 +190,9 @@ struct diagnostic_context
message, usually displayed once per compiler run. */
bool warnings_are_errors_message;
+ /* True if we should raise a SIGABRT on errors. */
+ bool abort_on_error;
+
/* This function is called before any message is printed out. It is
responsible for preparing message prefix and such. For example, it
might say:
@@ -259,12 +262,16 @@ struct diagnostic_context
#define diagnostic_set_last_module(DC) \
(DC)->last_module = input_file_stack_tick
+/* Raise SIGABRT on any diagnostic of severity DK_ERROR or higher. */
+#define diagnostic_abort_on_error(DC) \
+ (DC)->abort_on_error = true
+
/* This diagnostic_context is used by front-ends that directly output
diagnostic messages without going through `error', `warning',
and similar functions. */
extern diagnostic_context *global_dc;
-/* The total count of a KIND of diagnostics meitted so far. */
+/* The total count of a KIND of diagnostics emitted so far. */
#define diagnostic_kind_count(DC, DK) (DC)->diagnostic_count[(int) (DK)]
/* The number of errors that have been issued so far. Ideally, these
OpenPOWER on IntegriCloud