public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-5457] diagnostics: convert diagnostic_ready_p to an inline function
@ 2023-11-14 19:10 David Malcolm
0 siblings, 0 replies; only message in thread
From: David Malcolm @ 2023-11-14 19:10 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:d0bfd6ba3ba77fd372c1d3621521693b653cf8b1
commit r14-5457-gd0bfd6ba3ba77fd372c1d3621521693b653cf8b1
Author: David Malcolm <dmalcolm@redhat.com>
Date: Tue Nov 14 14:01:36 2023 -0500
diagnostics: convert diagnostic_ready_p to an inline function
No functional change intended.
gcc/ChangeLog:
* diagnostic.h (diagnostic_ready_p): Convert from macro to inline
function.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diff:
---
gcc/diagnostic.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h
index 7ae7cebf02e..2489855ae4a 100644
--- a/gcc/diagnostic.h
+++ b/gcc/diagnostic.h
@@ -764,7 +764,11 @@ extern diagnostic_context *global_dc;
/* Returns whether the diagnostic framework has been intialized already and is
ready for use. */
-#define diagnostic_ready_p() (global_dc->printer != NULL)
+inline bool
+diagnostic_ready_p ()
+{
+ return global_dc->printer != nullptr;
+}
/* The number of errors that have been issued so far. Ideally, these
would take a diagnostic_context as an argument. */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-11-14 19:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-14 19:10 [gcc r14-5457] diagnostics: convert diagnostic_ready_p to an inline function David Malcolm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).