https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117109
Bug ID: 117109 Summary: [15 Regression] "make gcc.pot" fails with "emit_diagnostic used incompatibly" since r15-4081-g385a232229a5b4 (diagnostics: bulletproof opening of SARIF output) Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: translation Severity: normal Priority: P3 Component: analyzer Assignee: dmalcolm at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org Target Milestone: --- cd $BUILD/gcc; make gcc.pot fails with: which invokes: AWK=$(AWK) $(SHELL) $(srcdir)/po/exgettext $(XGETTEXT) gcc $(srcdir) and fails with scanning for keywords, %e and %n strings... emit_diagnostic used incompatibly as both --keyword=emit_diagnostic:4 --flag=emit_diagnostic:4:gcc-internal-format and --keyword=emit_diagnostic:5 --flag=emit_diagnostic:5:gcc-internal-format Bisecting points to r15-4081-g385a232229a5b4 diagnostics: bulletproof opening of SARIF output [PR116978] * * * The scanning part of the exgettext is the following: while (getline < file) { if (/^(#[ ]*define[ ]*)?[A-Za-z_].*\(.*msgid[,\)]/) { keyword_option($0) } else if (/^(#[ ]*define[ ]*)?[A-Za-z_].*(\(|\(.*,)$/) { name_line = $0 while (getline < file) { lineno++ if (/msgid[,\)]/){ keyword_option(name_line $0) break } else if (/,$/) { name_line = name_line $0 * * * Debugging shows that diagnostic-global-context.cc has: emit_diagnostic (diagnostic_t kind, location_t location, diagnostic_option_id option_id, const char *gmsgid, ...) emit_diagnostic (diagnostic_t kind, rich_location *richloc, diagnostic_option_id option_id, const char *gmsgid, ...) That is both have "gmsgid" as 4th argument. But diagnostic.cc has: diagnostic_context::emit_diagnostic (diagnostic_t kind, rich_location &richloc, const diagnostic_metadata *metadata, diagnostic_ option_id option_id, const char *gmsgid, ...) That is "gmsgid" is the 5th argument.