https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90677
Bug ID: 90677 Summary: gcc-9.1.0 fails to build __gcc_diag__ souce: error: 'cgraph_node' is not defined as a type Product: gcc Version: 9.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at inbox dot ru Target Milestone: --- Minimal reproducer: $ cat tree-mudflap.i int cgraph_node; void a() __attribute__((__format__(__gcc_diag__, 2, 3))); $ LANG=C gcc-8.3.0 -fsyntax-only -c tree-mudflap.i $ LANG=C gcc-9.1.0 -fsyntax-only -c tree-mudflap.i tree-mudflap.i:2:1: error: 'cgraph_node' is not defined as a type 2 | void a() __attribute__((__format__(__gcc_diag__, 2, 3))); | ^~~~ The original build failure was observed on gcc-4.6.4. gcc-9.1.0 failed to to build gcc-4.6.4 while gcc-8.3.0 succeeded. I was not able to produce a reasonable workaround to make 4.6.4 compile again. gcc-4.6.4 failure looks like that: In file included from /tmp/portage/sys-devel/gcc-4.6.4-r1/work/gcc-4.6.4/gcc/diagnostic.h:25, from /tmp/portage/sys-devel/gcc-4.6.4-r1/work/gcc-4.6.4/gcc/tree-mudflap.c:41: /tmp/portage/sys-devel/gcc-4.6.4-r1/work/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); | ^~~~~~~~~~~~~ /tmp/portage/sys-devel/gcc-4.6.4-r1/work/gcc-4.6.4/gcc/pretty-print.h:325:6: error: 'cgraph_node' is not defined as a type 325 | ATTRIBUTE_GCC_PPDIAG(2,3); | ^~~~~~~~~~~~~ I think there are two bugs here: - (major) gcc-9.1.0 fails to build the code that used to compile - (minor) diagnostic complains about 'cgraph_node' but does not mention it in warning text.