https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90677

--- Comment #5 from Sergei Trofimovich <slyfox at inbox dot ru> ---
No problem! Thank you for the very detailed explanation! Name stealing makes
sense.

I managed to craft a workaround for old gcc-4.6.4 source code locally [1] and
not blocked by proper fix.

[1] the workaround:
--- a/gcc/pretty-print.h
+++ b/gcc/pretty-print.h
@@ -305,7 +305,7 @@ extern void pp_base_append_text (pretty_printer *, const
char *, const char *);

 /* This header may be included before diagnostics-core.h, hence the duplicate
    definitions to allow for GCC-specific formats.  */
-#if GCC_VERSION >= 3005
+#if (GCC_VERSION >= 3005) && (GCC_VERSION != 9001) /* 9.1.0 is buggy:
https://gcc.gnu.org/PR90677  */
 #define ATTRIBUTE_GCC_PPDIAG(m, n) __attribute__ ((__format__ (__gcc_diag__, m
,n))) ATTRIBUTE_NONNULL(m)
 #else
 #define ATTRIBUTE_GCC_PPDIAG(m, n) ATTRIBUTE_NONNULL(m)

Reply via email to