diff options
Diffstat (limited to 'gcc/diagnostic.c')
-rw-r--r-- | gcc/diagnostic.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c index 0fbf58f..61401e6 100644 --- a/gcc/diagnostic.c +++ b/gcc/diagnostic.c @@ -28,7 +28,6 @@ along with GCC; see the file COPYING3. If not see #include "coretypes.h" #include "version.h" #include "input.h" -#include "toplev.h" #include "intl.h" #include "diagnostic.h" @@ -46,6 +45,10 @@ static void diagnostic_action_after_output (diagnostic_context *, diagnostic_info *); static void real_abort (void) ATTRIBUTE_NORETURN; +/* Name of program invoked, sans directories. */ + +const char *progname; + /* A diagnostic_context surrogate for stderr. */ static diagnostic_context global_diagnostic_context; diagnostic_context *global_dc = &global_diagnostic_context; @@ -697,6 +700,14 @@ sorry (const char *gmsgid, ...) va_end (ap); } +/* Return true if an error or a "sorry" has been seen. Various + processing is disabled after errors. */ +bool +seen_error (void) +{ + return errorcount || sorrycount; +} + /* An error which is severe enough that we make no attempt to continue. Do not use this for internal consistency checks; that's internal_error. Use of this function should be rare. */ |