From: David Malcolm Date: Mon, 28 Apr 2025 22:21:18 +0000 (-0400) Subject: diagnostics: make diagnostic_context::m_abort_on_error private X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0c5b98be0806e275685a2803c49a695328f5dd8b;p=thirdparty%2Fgcc.git diagnostics: make diagnostic_context::m_abort_on_error private No functional change intended. gcc/ChangeLog: * diagnostic.h (diagnostic_context::set_abort_on_error): New. (diagnostic_context::m_abort_on_error): Make private. (diagnostic_abort_on_error): Delete. * opts.cc (setup_core_dumping): Update for above changes. Signed-off-by: David Malcolm --- diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h index 62bffd2c685..c679017d285 100644 --- a/gcc/diagnostic.h +++ b/gcc/diagnostic.h @@ -772,6 +772,13 @@ public: bool supports_fnotice_on_stderr_p () const; + /* Raise SIGABRT on any diagnostic of severity DK_ERROR or higher. */ + void + set_abort_on_error (bool val) + { + m_abort_on_error = val; + } + private: void error_recursion () ATTRIBUTE_NORETURN; @@ -828,10 +835,10 @@ private: each diagnostic, if known. */ bool m_show_option_requested; -public: /* True if we should raise a SIGABRT on errors. */ bool m_abort_on_error; +public: /* True if we should show the column number on diagnostics. */ bool m_show_column; @@ -1042,13 +1049,6 @@ diagnostic_text_finalizer (diagnostic_context *context) #define diagnostic_context_auxiliary_data(DC) (DC)->m_client_aux_data #define diagnostic_info_auxiliary_data(DI) (DI)->x_data -/* Raise SIGABRT on any diagnostic of severity DK_ERROR or higher. */ -inline void -diagnostic_abort_on_error (diagnostic_context *context) -{ - context->m_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. */ diff --git a/gcc/opts.cc b/gcc/opts.cc index d3e3a2dc0d1..a9b9b9148a9 100644 --- a/gcc/opts.cc +++ b/gcc/opts.cc @@ -3628,7 +3628,7 @@ setup_core_dumping (diagnostic_context *dc) "setting core file size limit to maximum: %m"); } #endif - diagnostic_abort_on_error (dc); + dc->set_abort_on_error (true); } /* Parse a -d command line switch for OPTS, location LOC,