From: David Malcolm Date: Tue, 14 Nov 2023 19:01:36 +0000 (-0500) Subject: diagnostics: convert diagnostic_ready_p to an inline function X-Git-Tag: basepoints/gcc-15~4682 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0bfd6ba3ba77fd372c1d3621521693b653cf8b1;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h index 7ae7cebf02ed..2489855ae4a4 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. */