summaryrefslogtreecommitdiff
path: root/gcc/diagnostic.c
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.c
parent35cf5a4cf3b060ce2a46462f0daad527d8822baf (diff)
downloadgcc-5f07bab078ec00fa479c9e5c522d321b43377b2b.tar.gz
* 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.c')
-rw-r--r--gcc/diagnostic.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c
index a192229bd59..21d78a95dc5 100644
--- a/gcc/diagnostic.c
+++ b/gcc/diagnostic.c
@@ -81,6 +81,7 @@ static void default_diagnostic_finalizer PARAMS ((diagnostic_context *,
static void error_recursion PARAMS ((diagnostic_context *)) ATTRIBUTE_NORETURN;
static bool text_specifies_location PARAMS ((text_info *, location_t *));
+static void real_abort PARAMS ((void)) ATTRIBUTE_NORETURN;
extern int rtl_dump_and_exit;
extern int warnings_are_errors;
@@ -1283,6 +1284,8 @@ diagnostic_report_diagnostic (context, diagnostic)
output_flush (&context->buffer);
}
+ if (context->abort_on_error && diagnostic->kind <= DK_ERROR)
+ real_abort();
--context->lock;
}
@@ -1459,3 +1462,13 @@ warn_deprecated_use (node)
warning ("type is deprecated");
}
}
+
+/* Really call the system 'abort'. This has to go right at the end of
+ this file, so that there are no functions after it that call abort
+ and get the system abort instead of our macro. */
+#undef abort
+static void
+real_abort ()
+{
+ abort ();
+}