blob: 77c9a1dcc8a72fb78ff7969102430e8b99d1cdbe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
The patch is a workaround to build this version of gcc with
gcc-9.1.0: https://gcc.gnu.org/PR90677
There gcc-9.1.0 pinned 'cgraph_node' to a wired-in type and
disallows anything else (function names in this case) to share
'cgraph_node' name.
Without this patch build fails as:
gcc-4.6.4/gcc/pretty-print.h:322:6: error: 'cgraph_node' is not defined as a type
322 | ATTRIBUTE_GCC_PPDIAG(2,3);
| ^~~~~~~~~~~~~
--- 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)
|